Skip to content

Commit

Permalink
save mails as draft only if they have been edited
Browse files Browse the repository at this point in the history
close #3580

Co-authored-by: paw-hub <paw@tutao.de>
  • Loading branch information
ganthern and paw-hub committed Jul 21, 2022
1 parent a2b52b1 commit 9d2c6f0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/mail/editor/MailEditor.ts
Expand Up @@ -710,6 +710,13 @@ async function createMailEditorDialog(model: SendMailModel, blockExternalContent
}

const minimize = () => {
// If the mail is unchanged, close instead of saving
if (!model.hasMailChanged()) {
dispose()
dialog.close()
return
}

const saveStatus = stream<SaveStatus>({status: SaveStatusEnum.Saving})
save(false)
.then(() => saveStatus({status: SaveStatusEnum.Saved}))
Expand Down

0 comments on commit 9d2c6f0

Please sign in to comment.