Prevent removal of messages when flagging

pull/210/head
M66B 2 years ago
parent 5d5c488b11
commit 168e778679

@ -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);
}

@ -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;

Loading…
Cancel
Save