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:
parent
e8e3542a2b
commit
1675ccd62e
1 changed files with 12 additions and 5 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue