Improved readHistory
This commit is contained in:
parent
9fda274d3b
commit
fc7071098e
@ -1119,7 +1119,7 @@ angular.module('myApp.services', [])
|
||||
return historyStorage.readPromise;
|
||||
}
|
||||
|
||||
var promise = MtpApiManager.invokeApi('messages.readHistory', {
|
||||
historyStorage.readPromise = MtpApiManager.invokeApi('messages.readHistory', {
|
||||
peer: inputPeer,
|
||||
offset: 0,
|
||||
max_id: 0
|
||||
@ -1135,7 +1135,6 @@ angular.module('myApp.services', [])
|
||||
delete historyStorage.readPromise;
|
||||
});
|
||||
|
||||
|
||||
if (historyStorage && historyStorage.history.length) {
|
||||
var messageID, message, i, peerID, foundDialog, dialog;
|
||||
for (i = 0; i < historyStorage.history.length; i++) {
|
||||
@ -1153,7 +1152,7 @@ angular.module('myApp.services', [])
|
||||
}
|
||||
}
|
||||
|
||||
return promise;
|
||||
return historyStorage.readPromise;
|
||||
}
|
||||
|
||||
function flushHistory (inputPeer) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user