Skip unnecessary seen operations

This commit is contained in:
M66B 2018-09-17 05:22:17 +00:00
parent 927891ae07
commit d653184aa9
1 changed files with 3 additions and 0 deletions

View File

@ -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 {
// Mark message (un)seen
boolean seen = jargs.getBoolean(0);
if (message.seen == seen)
return;
Message imessage = ifolder.getMessageByUID(message.uid);
if (imessage == null)
throw new MessageRemovedException();