Small improvement

pull/194/merge
M66B 3 years ago
parent 4dcad1c577
commit 0e489ccf14

@ -1364,13 +1364,15 @@ class Core {
// Delete source
if (!copy && (draft || !canMove)) {
try {
List<Message> deleted = new ArrayList<>();
for (Message imessage : map.keySet())
try {
imessage.setFlag(Flags.Flag.DELETED, true);
expunge(context, ifolder, Arrays.asList(map.keySet().toArray(new Message[0])));
deleted.add(imessage);
} catch (MessageRemovedException ex) {
Log.w(ex);
}
expunge(context, ifolder, deleted);
} else {
int count = MessageHelper.getMessageCount(ifolder);
db.folder().setFolderTotal(folder.id, count < 0 ? null : count);

Loading…
Cancel
Save