From 0041182a4c7248860ba2ee8f732f6482e365916f Mon Sep 17 00:00:00 2001 From: M66B Date: Wed, 12 Sep 2018 13:23:34 +0000 Subject: [PATCH] Small improvement --- .../main/java/eu/faircode/email/ServiceSynchronize.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/ServiceSynchronize.java b/app/src/main/java/eu/faircode/email/ServiceSynchronize.java index 38b121d7..5290adca 100644 --- a/app/src/main/java/eu/faircode/email/ServiceSynchronize.java +++ b/app/src/main/java/eu/faircode/email/ServiceSynchronize.java @@ -1359,12 +1359,10 @@ public class ServiceSynchronize extends LifecycleService { if (imessage.isExpunged()) { Log.i(Helper.TAG, folder.name + " expunged uid=" + uid); - imessage.invalidateHeaders(); return 0; } if (imessage.isSet(Flags.Flag.DELETED)) { Log.i(Helper.TAG, folder.name + " deleted uid=" + uid); - imessage.invalidateHeaders(); return 0; } @@ -1471,9 +1469,6 @@ public class ServiceSynchronize extends LifecycleService { message.write(context, helper.getHtml()); Log.i(Helper.TAG, folder.name + " added id=" + message.id + " uid=" + message.uid); - // Free memory - imessage.invalidateHeaders(); - int sequence = 0; for (EntityAttachment attachment : helper.getAttachments()) { sequence++; @@ -1497,6 +1492,9 @@ public class ServiceSynchronize extends LifecycleService { } } finally { //Log.v(Helper.TAG, folder.name + " end sync uid=" + uid); + + // Free memory + imessage.invalidateHeaders(); } }