mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-26 01:36:55 +00:00
Fixed composing message disappearing
This commit is contained in:
parent
2667816ecb
commit
c49e24c8b4
1 changed files with 8 additions and 6 deletions
|
@ -910,17 +910,19 @@ public class ServiceSynchronize extends LifecycleService {
|
||||||
MimeMessage imessage = MessageHelper.from(this, message, attachments, isession);
|
MimeMessage imessage = MessageHelper.from(this, message, attachments, isession);
|
||||||
AppendUID[] uid = ifolder.appendUIDMessages(new Message[]{imessage});
|
AppendUID[] uid = ifolder.appendUIDMessages(new Message[]{imessage});
|
||||||
|
|
||||||
if (message.uid != null) {
|
Long old = message.uid;
|
||||||
Message iprev = ifolder.getMessageByUID(message.uid);
|
|
||||||
|
db.message().setMessageUid(message.id, uid[0].uid);
|
||||||
|
Log.i(Helper.TAG, "Appended uid=" + message.uid);
|
||||||
|
|
||||||
|
if (old != null) {
|
||||||
|
Message iprev = ifolder.getMessageByUID(old);
|
||||||
if (iprev != null) {
|
if (iprev != null) {
|
||||||
Log.i(Helper.TAG, "Deleting existing id=" + message.id);
|
Log.i(Helper.TAG, "Deleting existing uid=" + old);
|
||||||
iprev.setFlag(Flags.Flag.DELETED, true);
|
iprev.setFlag(Flags.Flag.DELETED, true);
|
||||||
ifolder.expunge();
|
ifolder.expunge();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
db.message().setMessageUid(message.id, uid[0].uid);
|
|
||||||
Log.i(Helper.TAG, "Appended uid=" + message.uid);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void doMove(EntityFolder folder, Session isession, IMAPStore istore, IMAPFolder ifolder, EntityMessage message, JSONArray jargs, DB db) throws JSONException, MessagingException, IOException {
|
private void doMove(EntityFolder folder, Session isession, IMAPStore istore, IMAPFolder ifolder, EntityMessage message, JSONArray jargs, DB db) throws JSONException, MessagingException, IOException {
|
||||||
|
|
Loading…
Reference in a new issue