1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-01-01 04:35:57 +00:00

Mark notify to archive/trash as read

This commit is contained in:
M66B 2018-11-06 09:34:27 +00:00
parent 2066c83983
commit 59a579410f

View file

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