1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-01-01 04:35:57 +00:00

Fixed autoread on move from/to drafts

This commit is contained in:
M66B 2019-06-24 13:16:32 +02:00
parent e8e3542a2b
commit 1675ccd62e

View file

@ -581,10 +581,6 @@ class Core {
if (imessage == null)
throw new MessageRemovedException();
// Auto read
if (autoread && ifolder.getPermanentFlags().contains(Flags.Flag.SEEN))
imessage.setFlag(Flags.Flag.SEEN, true);
// Get target folder
EntityFolder target = db.folder().getFolder(id);
if (target == null)
@ -606,10 +602,21 @@ class Core {
file.delete();
// Auto read
if (autoread)
icopy.setFlag(Flags.Flag.SEEN, true);
// Set drafts flag
icopy.setFlag(Flags.Flag.DRAFT, EntityFolder.DRAFTS.equals(target.type));
itarget.appendMessages(new Message[]{icopy});
} else
} else {
// Auto read
if (autoread && ifolder.getPermanentFlags().contains(Flags.Flag.SEEN))
imessage.setFlag(Flags.Flag.SEEN, true);
ifolder.copyMessages(new Message[]{imessage}, itarget);
}
// Delete source
if (!copy) {