From 437ef94b6ccfec63dd45c5acd6729517a23ec2db Mon Sep 17 00:00:00 2001 From: M66B Date: Tue, 14 Aug 2018 12:34:57 +0000 Subject: [PATCH] Fixed seen --- app/src/main/java/eu/faircode/email/ActivityView.java | 2 +- app/src/main/java/eu/faircode/email/FragmentMessage.java | 2 +- app/src/main/java/eu/faircode/email/ServiceSynchronize.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/ActivityView.java b/app/src/main/java/eu/faircode/email/ActivityView.java index f032d85a..2fa3b20e 100644 --- a/app/src/main/java/eu/faircode/email/ActivityView.java +++ b/app/src/main/java/eu/faircode/email/ActivityView.java @@ -502,7 +502,7 @@ public class ActivityView extends ActivityBase implements FragmentManager.OnBack for (EntityMessage tmessage : db.message().getMessageByThread(message.account, message.thread)) { db.message().setMessageUiSeen(tmessage.id, true); - EntityOperation.queue(db, tmessage, EntityOperation.SEEN, tmessage.ui_seen); + EntityOperation.queue(db, tmessage, EntityOperation.SEEN, true); } db.setTransactionSuccessful(); diff --git a/app/src/main/java/eu/faircode/email/FragmentMessage.java b/app/src/main/java/eu/faircode/email/FragmentMessage.java index 67e11d8b..d94a72c3 100644 --- a/app/src/main/java/eu/faircode/email/FragmentMessage.java +++ b/app/src/main/java/eu/faircode/email/FragmentMessage.java @@ -413,7 +413,7 @@ public class FragmentMessage extends FragmentEx { for (EntityMessage tmessage : db.message().getMessageByThread(message.account, message.thread)) { db.message().setMessageUiSeen(tmessage.id, !message.ui_seen); - EntityOperation.queue(db, tmessage, EntityOperation.SEEN, tmessage.ui_seen); + EntityOperation.queue(db, tmessage, EntityOperation.SEEN, !tmessage.ui_seen); } db.setTransactionSuccessful(); diff --git a/app/src/main/java/eu/faircode/email/ServiceSynchronize.java b/app/src/main/java/eu/faircode/email/ServiceSynchronize.java index 6fa3866a..71f0f65f 100644 --- a/app/src/main/java/eu/faircode/email/ServiceSynchronize.java +++ b/app/src/main/java/eu/faircode/email/ServiceSynchronize.java @@ -1286,7 +1286,7 @@ public class ServiceSynchronize extends LifecycleService { } if (message != null) { - if (message.seen != seen) { + if (message.seen != seen || message.seen != message.ui_seen) { message.seen = seen; message.ui_seen = seen; db.message().updateMessage(message);