From 4e2d91af6a02e1b8ab5cf6a16ee2d3acf6221aff Mon Sep 17 00:00:00 2001 From: M66B Date: Mon, 3 Dec 2018 16:16:25 +0100 Subject: [PATCH] Mark similar messages seen, flagged and answered --- .../java/eu/faircode/email/EntityOperation.java | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/EntityOperation.java b/app/src/main/java/eu/faircode/email/EntityOperation.java index ca14f305b2..e92bf2f74c 100644 --- a/app/src/main/java/eu/faircode/email/EntityOperation.java +++ b/app/src/main/java/eu/faircode/email/EntityOperation.java @@ -84,12 +84,19 @@ public class EntityOperation { queue(db, message.folder, message.id, name, jargs); if (SEEN.equals(name)) { - db.message().setMessageUiSeen(message.id, (boolean) value); - db.message().setMessageUiIgnored(message.id, true); + for (EntityMessage similar : db.message().getMessageByMsgId(message.account, message.msgid, message.ui_found)) { + db.message().setMessageUiSeen(similar.id, (boolean) value); + db.message().setMessageUiIgnored(similar.id, true); + } + } else if (FLAG.equals(name)) - db.message().setMessageUiFlagged(message.id, (boolean) value); + for (EntityMessage similar : db.message().getMessageByMsgId(message.account, message.msgid, message.ui_found)) + db.message().setMessageUiFlagged(similar.id, (boolean) value); + else if (ANSWERED.equals(name)) - db.message().setMessageUiAnswered(message.id, (boolean) value); + for (EntityMessage similar : db.message().getMessageByMsgId(message.account, message.msgid, message.ui_found)) + db.message().setMessageUiAnswered(similar.id, (boolean) value); + else if (MOVE.equals(name)) db.message().setMessageUiHide(message.id, true); else if (DELETE.equals(name))