Fixed multi dialogs bug
This commit is contained in:
parent
63f5a5a4f1
commit
9af460a664
@ -48,7 +48,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<script type="text/javascript" src="js/lib/config.js"></script>
|
<script type="text/javascript" src="js/lib/config.js"></script>
|
||||||
<script type="text/javascript" src="js/lib/mtproto.js?14"></script>
|
<script type="text/javascript" src="js/lib/mtproto.js?15"></script>
|
||||||
|
|
||||||
<script type="text/javascript" src="js/util.js"></script>
|
<script type="text/javascript" src="js/util.js"></script>
|
||||||
<script type="text/javascript" src="js/app.js?5"></script>
|
<script type="text/javascript" src="js/app.js?5"></script>
|
||||||
|
@ -423,7 +423,10 @@ angular.module('myApp.services', [])
|
|||||||
NotificationsManager.start();
|
NotificationsManager.start();
|
||||||
|
|
||||||
function getDialogs (offset, limit) {
|
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({
|
return $q.when({
|
||||||
count: dialogsStorage.count,
|
count: dialogsStorage.count,
|
||||||
dialogs: dialogsStorage.dialogs.slice(offset, offset + limit)
|
dialogs: dialogsStorage.dialogs.slice(offset, offset + limit)
|
||||||
|
Loading…
Reference in New Issue
Block a user