Fixed empty history state
This commit is contained in:
parent
2dcaa17d85
commit
af109eea13
@ -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;
|
||||
|
@ -98,7 +98,7 @@
|
||||
<div class="im_history_scrollable">
|
||||
|
||||
<div class="im_history" ng-class="{im_history_selectable: selectActions}">
|
||||
<div class="im_history_messages_none" ng-show="mediaEmpty">No messages to display</div>
|
||||
<div class="im_history_messages_none" ng-show="historyEmpty && !history.length">No messages to display</div>
|
||||
<div class="im_history_message_wrap" my-message ng-repeat="historyMessage in history"></div>
|
||||
</div>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user