mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-26 17:57:16 +00:00
Skip unnecessary seen operations
This commit is contained in:
parent
927891ae07
commit
d653184aa9
1 changed files with 3 additions and 0 deletions
|
@ -997,6 +997,9 @@ public class ServiceSynchronize extends LifecycleService {
|
||||||
private void doSeen(EntityFolder folder, IMAPFolder ifolder, EntityMessage message, JSONArray jargs, DB db) throws MessagingException, JSONException {
|
private void doSeen(EntityFolder folder, IMAPFolder ifolder, EntityMessage message, JSONArray jargs, DB db) throws MessagingException, JSONException {
|
||||||
// Mark message (un)seen
|
// Mark message (un)seen
|
||||||
boolean seen = jargs.getBoolean(0);
|
boolean seen = jargs.getBoolean(0);
|
||||||
|
if (message.seen == seen)
|
||||||
|
return;
|
||||||
|
|
||||||
Message imessage = ifolder.getMessageByUID(message.uid);
|
Message imessage = ifolder.getMessageByUID(message.uid);
|
||||||
if (imessage == null)
|
if (imessage == null)
|
||||||
throw new MessageRemovedException();
|
throw new MessageRemovedException();
|
||||||
|
|
Loading…
Reference in a new issue