diff --git a/app/index.html b/app/index.html index b564875d..81180340 100644 --- a/app/index.html +++ b/app/index.html @@ -48,7 +48,7 @@ - + diff --git a/app/js/services.js b/app/js/services.js index bee47a03..ef4be374 100644 --- a/app/js/services.js +++ b/app/js/services.js @@ -423,7 +423,10 @@ angular.module('myApp.services', []) NotificationsManager.start(); function getDialogs (offset, limit) { - if (dialogsStorage.count !== null && dialogsStorage.dialogs.length >= offset + limit) { + if (dialogsStorage.count !== null && ( + dialogsStorage.dialogs.length >= offset + limit || + dialogsStorage.dialogs.length == dialogsStorage.count + )) { return $q.when({ count: dialogsStorage.count, dialogs: dialogsStorage.dialogs.slice(offset, offset + limit)