Browse Source

Get 20 message on mobile

master
Igor Zhukov 10 years ago
parent
commit
fd3758327a
  1. 8
      app/js/controllers.js

8
app/js/controllers.js

@ -809,9 +809,10 @@ angular.module('myApp.controllers', [])
var curJump = jump, var curJump = jump,
curMoreJump = moreJump, curMoreJump = moreJump,
inputMediaFilter = $scope.historyFilter.mediaType && {_: inputMediaFilters[$scope.historyFilter.mediaType]}, inputMediaFilter = $scope.historyFilter.mediaType && {_: inputMediaFilters[$scope.historyFilter.mediaType]},
limit = Config.Navigator.mobile ? 20 : 0,
getMessagesPromise = inputMediaFilter getMessagesPromise = inputMediaFilter
? AppMessagesManager.getSearch($scope.curDialog.inputPeer, '', inputMediaFilter, maxID) ? AppMessagesManager.getSearch($scope.curDialog.inputPeer, '', inputMediaFilter, maxID, limit)
: AppMessagesManager.getHistory($scope.curDialog.inputPeer, maxID); : AppMessagesManager.getHistory($scope.curDialog.inputPeer, maxID, limit);
getMessagesPromise.then(function (historyResult) { getMessagesPromise.then(function (historyResult) {
if (curJump != jump || curMoreJump != moreJump) return; if (curJump != jump || curMoreJump != moreJump) return;
@ -849,6 +850,9 @@ angular.module('myApp.controllers', [])
else if (forceRecent) { else if (forceRecent) {
limit = 10; limit = 10;
} }
else if (Config.Navigator.mobile) {
limit = 20;
}
var curJump = ++jump, var curJump = ++jump,
inputMediaFilter = $scope.historyFilter.mediaType && {_: inputMediaFilters[$scope.historyFilter.mediaType]}, inputMediaFilter = $scope.historyFilter.mediaType && {_: inputMediaFilters[$scope.historyFilter.mediaType]},

Loading…
Cancel
Save