diff --git a/app/src/main/java/eu/faircode/email/Core.java b/app/src/main/java/eu/faircode/email/Core.java index b3fe90a462..9a9f386b2e 100644 --- a/app/src/main/java/eu/faircode/email/Core.java +++ b/app/src/main/java/eu/faircode/email/Core.java @@ -745,7 +745,8 @@ class Core { // Cleanup messages if (MessageHelper.isRemoved(ex)) { if (message != null && - !EntityOperation.SEEN.equals(op.name)) + !EntityOperation.SEEN.equals(op.name) && + !EntityOperation.FLAG.equals(op.name)) db.message().deleteMessage(message.id); } diff --git a/app/src/main/java/eu/faircode/email/EntityOperation.java b/app/src/main/java/eu/faircode/email/EntityOperation.java index cf9a67cff5..7e3ba6c9d7 100644 --- a/app/src/main/java/eu/faircode/email/EntityOperation.java +++ b/app/src/main/java/eu/faircode/email/EntityOperation.java @@ -729,7 +729,9 @@ public class EntityOperation { if (SYNC.equals(name)) db.folder().setFolderSyncState(folder, null); - if (fetch && message != null && !SEEN.equals(name)) { + if (fetch && message != null && + !SEEN.equals(name) && + !FLAG.equals(name)) { EntityMessage m = db.message().getMessage(message); if (m == null || m.uid == null) return;