|
|
@ -337,6 +337,7 @@ angular.module('myApp.controllers', []) |
|
|
|
StatusManager.start(); |
|
|
|
StatusManager.start(); |
|
|
|
|
|
|
|
|
|
|
|
$scope.history = []; |
|
|
|
$scope.history = []; |
|
|
|
|
|
|
|
$scope.historyEmpty = false; |
|
|
|
$scope.mediaType = false; |
|
|
|
$scope.mediaType = false; |
|
|
|
$scope.selectedMsgs = {}; |
|
|
|
$scope.selectedMsgs = {}; |
|
|
|
$scope.selectedCount = 0; |
|
|
|
$scope.selectedCount = 0; |
|
|
@ -449,10 +450,14 @@ angular.module('myApp.controllers', []) |
|
|
|
? AppMessagesManager.getSearch($scope.curDialog.inputPeer, '', inputMediaFilter, maxID, startLimit) |
|
|
|
? AppMessagesManager.getSearch($scope.curDialog.inputPeer, '', inputMediaFilter, maxID, startLimit) |
|
|
|
: AppMessagesManager.getHistory($scope.curDialog.inputPeer, maxID); |
|
|
|
: AppMessagesManager.getHistory($scope.curDialog.inputPeer, maxID); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.historyEmpty = false; |
|
|
|
|
|
|
|
|
|
|
|
getMessagesPromise.then(function (historyResult) { |
|
|
|
getMessagesPromise.then(function (historyResult) { |
|
|
|
if (curJump != jump) return; |
|
|
|
if (curJump != jump) return; |
|
|
|
|
|
|
|
|
|
|
|
offset += historyResult.history.length; |
|
|
|
offset += historyResult.history.length; |
|
|
|
|
|
|
|
$scope.historyEmpty = !historyResult.count; |
|
|
|
|
|
|
|
|
|
|
|
hasMore = offset < historyResult.count; |
|
|
|
hasMore = offset < historyResult.count; |
|
|
|
maxID = historyResult.history[historyResult.history.length - 1]; |
|
|
|
maxID = historyResult.history[historyResult.history.length - 1]; |
|
|
|
|
|
|
|
|
|
|
|