Revert "Selective expunged when UIDPLUS"

This reverts commit c0dd77e44c.
This commit is contained in:
M66B 2020-09-13 13:36:11 +02:00
parent 62614e4d9d
commit d187e392d0
1 changed files with 8 additions and 24 deletions

View File

@ -588,9 +588,6 @@ class Core {
try {
Log.i(name + " deleting uid=" + muid + " for msgid=" + msgid);
iexisting.setFlag(Flags.Flag.DELETED, true);
if (MessageHelper.hasCapability(ifolder, "UIDPLUS"))
ifolder.expunge(new Message[]{iexisting});
else
purged = true;
} catch (MessageRemovedException ignored) {
Log.w(name + " existing gone uid=" + muid + " for msgid=" + msgid);
@ -763,9 +760,6 @@ class Core {
if (imessage == null)
throw new MessageRemovedException();
imessage.setFlag(Flags.Flag.DELETED, true);
if (MessageHelper.hasCapability(ifolder, "UIDPLUS"))
ifolder.expunge(new Message[]{imessage});
else
ifolder.expunge();
} catch (MessagingException ex) {
Log.w(ex);
@ -904,13 +898,10 @@ class Core {
try {
Log.i(folder.name + " deleting uid=" + message.uid);
iexisting.setFlag(Flags.Flag.DELETED, true);
if (MessageHelper.hasCapability(ifolder, "UIDPLUS"))
ifolder.expunge(new Message[]{iexisting});
else
ifolder.expunge();
} catch (MessageRemovedException ignored) {
Log.w(folder.name + " existing gone uid=" + message.uid);
}
ifolder.expunge();
}
}
@ -1027,13 +1018,9 @@ class Core {
try {
for (Message imessage : map.keySet())
imessage.setFlag(Flags.Flag.DELETED, true);
if (MessageHelper.hasCapability(ifolder, "UIDPLUS"))
ifolder.expunge(map.keySet().toArray(new Message[0]));
else
ifolder.expunge();
} catch (MessageRemovedException ex) {
Log.w(ex);
} catch (MessageRemovedException ignored) {
}
ifolder.expunge();
} else {
int count = MessageHelper.getMessageCount(ifolder);
db.folder().setFolderTotal(folder.id, count < 0 ? null : count);
@ -1240,7 +1227,7 @@ class Core {
Message[] imessages = ifolder.search(new MessageIDTerm(message.msgid));
if (imessages == null)
Log.w(folder.name + " search for msgid=" + message.msgid + " returned null");
else {
else
for (Message iexisting : imessages) {
long muid = ifolder.getUID(iexisting);
Log.i(folder.name + " deleting uid=" + muid);
@ -1250,12 +1237,9 @@ class Core {
Log.w(folder.name + " existing gone uid=" + muid);
}
}
if (MessageHelper.hasCapability(ifolder, "UIDPLUS"))
ifolder.expunge(imessages);
else
}
ifolder.expunge();
}
}
db.message().deleteMessage(message.id);
} finally {