mirror of
https://github.com/DrKLO/Telegram.git
synced 2024-12-22 22:45:18 +01:00
Bug fixes
This commit is contained in:
parent
ff7e6ab3c9
commit
feaf6c32d8
1 changed files with 11 additions and 4 deletions
|
@ -2271,6 +2271,8 @@ public class MessagesController implements NotificationCenter.NotificationCenter
|
||||||
}
|
}
|
||||||
sentMessage.message = newMsg.message;
|
sentMessage.message = newMsg.message;
|
||||||
sentMessage.attachPath = newMsg.attachPath;
|
sentMessage.attachPath = newMsg.attachPath;
|
||||||
|
newMsg.media.photo.id = sentMessage.media.photo.id;
|
||||||
|
newMsg.media.photo.access_hash = sentMessage.media.photo.access_hash;
|
||||||
} else if (sentMessage.media instanceof TLRPC.TL_messageMediaVideo && sentMessage.media.video != null && newMsg.media instanceof TLRPC.TL_messageMediaVideo && newMsg.media.video != null) {
|
} else if (sentMessage.media instanceof TLRPC.TL_messageMediaVideo && sentMessage.media.video != null && newMsg.media instanceof TLRPC.TL_messageMediaVideo && newMsg.media.video != null) {
|
||||||
MessagesStorage.getInstance().putSentFile(originalPath, sentMessage.media.video, 2);
|
MessagesStorage.getInstance().putSentFile(originalPath, sentMessage.media.video, 2);
|
||||||
|
|
||||||
|
@ -2289,6 +2291,9 @@ public class MessagesController implements NotificationCenter.NotificationCenter
|
||||||
}
|
}
|
||||||
sentMessage.message = newMsg.message;
|
sentMessage.message = newMsg.message;
|
||||||
sentMessage.attachPath = newMsg.attachPath;
|
sentMessage.attachPath = newMsg.attachPath;
|
||||||
|
newMsg.media.video.dc_id = sentMessage.media.video.dc_id;
|
||||||
|
newMsg.media.video.id = sentMessage.media.video.id;
|
||||||
|
newMsg.media.video.access_hash = sentMessage.media.video.access_hash;
|
||||||
} else if (sentMessage.media instanceof TLRPC.TL_messageMediaDocument && sentMessage.media.document != null && newMsg.media instanceof TLRPC.TL_messageMediaDocument && newMsg.media.document != null) {
|
} else if (sentMessage.media instanceof TLRPC.TL_messageMediaDocument && sentMessage.media.document != null && newMsg.media instanceof TLRPC.TL_messageMediaDocument && newMsg.media.document != null) {
|
||||||
MessagesStorage.getInstance().putSentFile(originalPath, sentMessage.media.document, 1);
|
MessagesStorage.getInstance().putSentFile(originalPath, sentMessage.media.document, 1);
|
||||||
|
|
||||||
|
@ -2311,8 +2316,6 @@ public class MessagesController implements NotificationCenter.NotificationCenter
|
||||||
boolean result = cacheFile.renameTo(cacheFile2);
|
boolean result = cacheFile.renameTo(cacheFile2);
|
||||||
if (result) {
|
if (result) {
|
||||||
newMsg.attachPath = null;
|
newMsg.attachPath = null;
|
||||||
newMsg.media.document.dc_id = sentMessage.media.document.dc_id;
|
|
||||||
newMsg.media.document.id = sentMessage.media.document.id;
|
|
||||||
} else {
|
} else {
|
||||||
sentMessage.attachPath = newMsg.attachPath;
|
sentMessage.attachPath = newMsg.attachPath;
|
||||||
sentMessage.message = newMsg.message;
|
sentMessage.message = newMsg.message;
|
||||||
|
@ -2321,6 +2324,9 @@ public class MessagesController implements NotificationCenter.NotificationCenter
|
||||||
sentMessage.attachPath = newMsg.attachPath;
|
sentMessage.attachPath = newMsg.attachPath;
|
||||||
sentMessage.message = newMsg.message;
|
sentMessage.message = newMsg.message;
|
||||||
}
|
}
|
||||||
|
newMsg.media.document.dc_id = sentMessage.media.document.dc_id;
|
||||||
|
newMsg.media.document.id = sentMessage.media.document.id;
|
||||||
|
newMsg.media.document.access_hash = sentMessage.media.document.access_hash;
|
||||||
} else if (sentMessage.media instanceof TLRPC.TL_messageMediaAudio && sentMessage.media.audio != null && newMsg.media instanceof TLRPC.TL_messageMediaAudio && newMsg.media.audio != null) {
|
} else if (sentMessage.media instanceof TLRPC.TL_messageMediaAudio && sentMessage.media.audio != null && newMsg.media instanceof TLRPC.TL_messageMediaAudio && newMsg.media.audio != null) {
|
||||||
sentMessage.message = newMsg.message;
|
sentMessage.message = newMsg.message;
|
||||||
sentMessage.attachPath = newMsg.attachPath;
|
sentMessage.attachPath = newMsg.attachPath;
|
||||||
|
@ -2331,9 +2337,10 @@ public class MessagesController implements NotificationCenter.NotificationCenter
|
||||||
File cacheFile = new File(AndroidUtilities.getCacheDir(), fileName);
|
File cacheFile = new File(AndroidUtilities.getCacheDir(), fileName);
|
||||||
File cacheFile2 = new File(AndroidUtilities.getCacheDir(), fileName2);
|
File cacheFile2 = new File(AndroidUtilities.getCacheDir(), fileName2);
|
||||||
cacheFile.renameTo(cacheFile2);
|
cacheFile.renameTo(cacheFile2);
|
||||||
newMsg.media.audio.dc_id = sentMessage.media.audio.dc_id;
|
|
||||||
newMsg.media.audio.id = sentMessage.media.audio.id;
|
|
||||||
}
|
}
|
||||||
|
newMsg.media.audio.dc_id = sentMessage.media.audio.dc_id;
|
||||||
|
newMsg.media.audio.id = sentMessage.media.audio.id;
|
||||||
|
newMsg.media.audio.access_hash = sentMessage.media.audio.access_hash;
|
||||||
}
|
}
|
||||||
} else if (file != null) {
|
} else if (file != null) {
|
||||||
if (newMsg.media instanceof TLRPC.TL_messageMediaPhoto && newMsg.media.photo != null) {
|
if (newMsg.media instanceof TLRPC.TL_messageMediaPhoto && newMsg.media.photo != null) {
|
||||||
|
|
Loading…
Reference in a new issue