From 43a18d3cf658c76110b0cc98b800a27bf9ee707f Mon Sep 17 00:00:00 2001 From: M66B Date: Mon, 10 Feb 2020 11:40:53 +0100 Subject: [PATCH] Inherit similar message color --- app/src/main/java/eu/faircode/email/Core.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/src/main/java/eu/faircode/email/Core.java b/app/src/main/java/eu/faircode/email/Core.java index 0b34da9221..cb7b144941 100644 --- a/app/src/main/java/eu/faircode/email/Core.java +++ b/app/src/main/java/eu/faircode/email/Core.java @@ -2041,6 +2041,7 @@ class Core { // Find message by Message-ID (slow, headers required) // - messages in inbox have same id as message sent to self // - messages in archive have same id as original + Integer color = null; if (message == null) { String msgid = helper.getMessageID(); Log.i(folder.name + " searching for " + msgid); @@ -2072,6 +2073,9 @@ class Core { process = true; } } + + if (dup.flagged && dup.color != null) + color = dup.color; } } @@ -2140,6 +2144,9 @@ class Core { message.ui_ignored = seen; message.ui_browsed = browsed; + if (message.flagged) + message.color = color; + if (MessageHelper.equal(message.submitter, message.from)) message.submitter = null;