From 59a579410fcb47073fdea3bc5c583161c8f1c401 Mon Sep 17 00:00:00 2001 From: M66B Date: Tue, 6 Nov 2018 09:34:27 +0000 Subject: [PATCH] Mark notify to archive/trash as read --- .../main/java/eu/faircode/email/ServiceSynchronize.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/ServiceSynchronize.java b/app/src/main/java/eu/faircode/email/ServiceSynchronize.java index 4d3bdef7f7..5fd78710d4 100644 --- a/app/src/main/java/eu/faircode/email/ServiceSynchronize.java +++ b/app/src/main/java/eu/faircode/email/ServiceSynchronize.java @@ -279,13 +279,17 @@ public class ServiceSynchronize extends LifecycleService { EntityFolder archive = db.folder().getFolderByType(message.account, EntityFolder.ARCHIVE); if (archive == null) archive = db.folder().getFolderByType(message.account, EntityFolder.TRASH); - if (archive != null) + if (archive != null) { + EntityOperation.queue(db, message, EntityOperation.SEEN, true); EntityOperation.queue(db, message, EntityOperation.MOVE, archive.id); + } } else if ("trash".equals(action)) { db.message().setMessageUiHide(message.id, true); EntityFolder trash = db.folder().getFolderByType(message.account, EntityFolder.TRASH); - if (trash != null) + if (trash != null) { + EntityOperation.queue(db, message, EntityOperation.SEEN, true); EntityOperation.queue(db, message, EntityOperation.MOVE, trash.id); + } } else if ("ignored".equals(action)) db.message().setMessageUiIgnored(message.id, true);