Fixed tgme sync
This commit is contained in:
parent
d7b1def56b
commit
666d492a76
@ -24,7 +24,7 @@ angular.module('izhukov.mtproto.wrapper', ['izhukov.utils', 'izhukov.mtproto'])
|
|||||||
});
|
});
|
||||||
|
|
||||||
function telegramMeNotify (newValue) {
|
function telegramMeNotify (newValue) {
|
||||||
if (telegramMeNotified != newValue) {
|
if (telegramMeNotified !== newValue) {
|
||||||
telegramMeNotified = newValue;
|
telegramMeNotified = newValue;
|
||||||
TelegramMeWebService.setAuthorized(telegramMeNotified);
|
TelegramMeWebService.setAuthorized(telegramMeNotified);
|
||||||
}
|
}
|
||||||
|
@ -687,7 +687,7 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
.service('AppMessagesManager', function ($q, $rootScope, $location, $filter, ApiUpdatesManager, AppUsersManager, AppChatsManager, AppPeersManager, AppPhotosManager, AppVideoManager, AppDocsManager, AppAudioManager, MtpApiManager, MtpApiFileManager, RichTextProcessor, NotificationsManager, SearchIndexManager, PeersSelectService,Storage, FileManager, _) {
|
.service('AppMessagesManager', function ($q, $rootScope, $location, $filter, ApiUpdatesManager, AppUsersManager, AppChatsManager, AppPeersManager, AppPhotosManager, AppVideoManager, AppDocsManager, AppAudioManager, MtpApiManager, MtpApiFileManager, RichTextProcessor, NotificationsManager, SearchIndexManager, PeersSelectService, Storage, FileManager, TelegramMeWebService, _) {
|
||||||
|
|
||||||
var messagesStorage = {};
|
var messagesStorage = {};
|
||||||
var messagesForHistory = {};
|
var messagesForHistory = {};
|
||||||
@ -775,6 +775,8 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
|
|||||||
limit: limit,
|
limit: limit,
|
||||||
max_id: maxID || 0
|
max_id: maxID || 0
|
||||||
}).then(function (dialogsResult) {
|
}).then(function (dialogsResult) {
|
||||||
|
TelegramMeWebService.setAuthorized(true);
|
||||||
|
|
||||||
AppUsersManager.saveApiUsers(dialogsResult.users);
|
AppUsersManager.saveApiUsers(dialogsResult.users);
|
||||||
AppChatsManager.saveApiChats(dialogsResult.chats);
|
AppChatsManager.saveApiChats(dialogsResult.chats);
|
||||||
saveMessages(dialogsResult.messages);
|
saveMessages(dialogsResult.messages);
|
||||||
|
Loading…
Reference in New Issue
Block a user