Update to 5.3.1

This commit is contained in:
DrKLO 2019-02-08 05:30:32 +03:00
parent a724d96e9c
commit f338a88eb4
82 changed files with 5853 additions and 2807 deletions

View file

@ -704,8 +704,12 @@ public class SecretChatHelper {
if (isSecretVisibleMessage(newMsgObj)) {
newMsgObj.date = res.date;
}
int existFlags;
if (newMsg != null && res.file instanceof TLRPC.TL_encryptedFile) {
updateMediaPaths(newMsg, res.file, req, originalPath);
existFlags = newMsg.getMediaExistanceFlags();
} else {
existFlags = 0;
}
MessagesStorage.getInstance(currentAccount).getStorageQueue().postRunnable(() -> {
if (isSecretInvisibleMessage(newMsgObj)) {
@ -714,7 +718,7 @@ public class SecretChatHelper {
MessagesStorage.getInstance(currentAccount).updateMessageStateAndId(newMsgObj.random_id, newMsgObj.id, newMsgObj.id, res.date, false, 0);
AndroidUtilities.runOnUIThread(() -> {
newMsgObj.send_state = MessageObject.MESSAGE_SEND_STATE_SENT;
NotificationCenter.getInstance(currentAccount).postNotificationName(NotificationCenter.messageReceivedByServer, newMsgObj.id, newMsgObj.id, newMsgObj, newMsgObj.dialog_id, 0L);
NotificationCenter.getInstance(currentAccount).postNotificationName(NotificationCenter.messageReceivedByServer, newMsgObj.id, newMsgObj.id, newMsgObj, newMsgObj.dialog_id, 0L, existFlags);
SendMessagesHelper.getInstance(currentAccount).processSentMessage(newMsgObj.id);
if (MessageObject.isVideoMessage(newMsgObj) || MessageObject.isNewGifMessage(newMsgObj) || MessageObject.isRoundVideoMessage(newMsgObj)) {
SendMessagesHelper.getInstance(currentAccount).stopVideoService(attachPath);