|
|
|
@ -1119,7 +1119,7 @@ angular.module('myApp.services', [])
@@ -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', [])
@@ -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', [])
@@ -1153,7 +1152,7 @@ angular.module('myApp.services', [])
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return promise; |
|
|
|
|
return historyStorage.readPromise; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function flushHistory (inputPeer) { |
|
|
|
|