From d3bcfbfe454c7e21c393823b8da0010f8a85d732 Mon Sep 17 00:00:00 2001 From: Ben Gotow Date: Sat, 3 Feb 2018 11:06:58 -0800 Subject: [PATCH] Display an error dialog if the user needs to choose a drafts folder to send mail #634 --- app/src/flux/tasks/syncback-draft-task.es6 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/src/flux/tasks/syncback-draft-task.es6 b/app/src/flux/tasks/syncback-draft-task.es6 index 4a2bdcb93..4b72da938 100644 --- a/app/src/flux/tasks/syncback-draft-task.es6 +++ b/app/src/flux/tasks/syncback-draft-task.es6 @@ -19,4 +19,14 @@ export default class SyncbackDraftTask extends Task { this.accountId = (draft || {}).accountId; this.headerMessageId = (draft || {}).headerMessageId; } + + onError({ key, debuginfo }) { + if (key === 'no-drafts-folder') { + AppEnv.showErrorDialog({ + title: 'Drafts folder not found', + message: + "Mailspring can't find your Drafts folder. To create and send mail, visit Preferences > Folders and choose a Drafts folder.", + }); + } + } }