Small optimization

This commit is contained in:
M66B 2020-05-03 18:37:20 +02:00
parent a593188019
commit c22bf91210
1 changed files with 4 additions and 1 deletions

View File

@ -558,17 +558,20 @@ class Core {
}
if (uid != null && purge) {
boolean purged = false;
for (Message iexisting : imessages) {
long muid = ifolder.getUID(iexisting);
if (muid != uid)
try {
Log.i(name + " deleting uid=" + muid + " for msgid=" + msgid);
iexisting.setFlag(Flags.Flag.DELETED, true);
purged = true;
} catch (MessageRemovedException ignored) {
Log.w(name + " existing gone uid=" + muid + " for msgid=" + msgid);
}
}
ifolder.expunge();
if (purged)
ifolder.expunge();
}
}