From af109eea13c25bd8c699568f961b1a9e24fe93c1 Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Wed, 12 Mar 2014 23:29:36 +0100 Subject: [PATCH] Fixed empty history state --- app/js/controllers.js | 5 ++++- app/partials/im.html | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/js/controllers.js b/app/js/controllers.js index ec7cda06..38d92525 100644 --- a/app/js/controllers.js +++ b/app/js/controllers.js @@ -335,6 +335,7 @@ angular.module('myApp.controllers', []) StatusManager.start(); $scope.history = []; + $scope.historyEmpty = false; $scope.mediaType = false; $scope.selectedMsgs = {}; $scope.selectedCount = 0; @@ -446,10 +447,12 @@ angular.module('myApp.controllers', []) ? AppMessagesManager.getSearch($scope.curDialog.inputPeer, '', inputMediaFilter, maxID, startLimit) : AppMessagesManager.getHistory($scope.curDialog.inputPeer, maxID, startLimit); + $scope.historyEmpty = false; + getMessagesPromise.then(function (historyResult) { if (curJump != jump) return; - historyResult.count === 0 ? $scope.mediaEmpty = true : $scope.mediaEmpty = false; + $scope.historyEmpty = !historyResult.count; offset += startLimit; hasMore = offset < historyResult.count; diff --git a/app/partials/im.html b/app/partials/im.html index 6dd6337e..ce98ca0c 100644 --- a/app/partials/im.html +++ b/app/partials/im.html @@ -98,7 +98,7 @@
-
No messages to display
+
No messages to display