From 793319e5f2c4ac151deee3694aff8c2c873bcf79 Mon Sep 17 00:00:00 2001 From: M66B Date: Fri, 7 Aug 2020 20:52:20 +0200 Subject: [PATCH] Set flags when needed only on move --- app/src/main/java/eu/faircode/email/Core.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/Core.java b/app/src/main/java/eu/faircode/email/Core.java index c765eeb3a0..a21d210e49 100644 --- a/app/src/main/java/eu/faircode/email/Core.java +++ b/app/src/main/java/eu/faircode/email/Core.java @@ -991,11 +991,11 @@ class Core { Log.i("Move seen=" + seen + " unflag=" + unflag + " flags=" + imessage.getFlags() + " can=" + canMove); // Mark read - if (seen && flags.contains(Flags.Flag.SEEN)) + if (seen && !imessage.isSet(Flags.Flag.SEEN) && flags.contains(Flags.Flag.SEEN)) imessage.setFlag(Flags.Flag.SEEN, true); // Remove star - if (unflag && flags.contains(Flags.Flag.FLAGGED)) + if (unflag && imessage.isSet(Flags.Flag.FLAGGED) && flags.contains(Flags.Flag.FLAGGED)) imessage.setFlag(Flags.Flag.FLAGGED, false); }