Browse Source

Fixed multi dialogs bug

master
Igor Zhukov 11 years ago
parent
commit
9af460a664
  1. 2
      app/index.html
  2. 5
      app/js/services.js

2
app/index.html

@ -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>

5
app/js/services.js

@ -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…
Cancel
Save