From e665af610681ea63628b4dd01de6301a3ba54a2c Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Mon, 27 Jan 2014 00:47:56 +0400 Subject: [PATCH] merged with master --- index.html | 2 +- js/services.js | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index b564875d..81180340 100644 --- a/index.html +++ b/index.html @@ -48,7 +48,7 @@ - + diff --git a/js/services.js b/js/services.js index bee47a03..ef4be374 100644 --- a/js/services.js +++ b/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)