Eliminate progress dialog flash saving draft while closing window r+sr=bienvenu
--- a/mail/components/compose/content/MsgComposeCommands.js
+++ b/mail/components/compose/content/MsgComposeCommands.js
@@ -2378,17 +2378,17 @@ function ComposeCanClose()
(gPromptService.BUTTON_TITLE_CANCEL * gPromptService.BUTTON_POS_1) +
(gPromptService.BUTTON_TITLE_DONT_SAVE * gPromptService.BUTTON_POS_2),
null, null, null,
null, {value:0});
switch (result)
{
case 0: //Save
gCloseWindowAfterSave = true;
- SaveAsDraft();
+ GenericSendMessage(nsIMsgCompDeliverMode.AutoSaveAsDraft);
return false;
case 1: //Cancel
return false;
case 2: //Don't Save
// don't delete the draft if we didn't start off editing a draft
// and the user hasn't explicitly saved it.
if (!gEditingDraft && gAutoSaveKickedIn)
RemoveDraft();
--- a/mailnews/compose/resources/content/MsgComposeCommands.js
+++ b/mailnews/compose/resources/content/MsgComposeCommands.js
@@ -2397,17 +2397,17 @@ function ComposeCanClose()
null, {value:0});
switch (result)
{
case 0: //Save
// we can close immediately if we already autosaved the draft
if (!gContentChanged && !gMsgCompose.bodyModified)
break;
gCloseWindowAfterSave = true;
- SaveAsDraft();
+ GenericSendMessage(nsIMsgCompDeliverMode.AutoSaveAsDraft);
return false;
case 1: //Cancel
return false;
case 2: //Don't Save
// only delete the draft if we didn't start off editing a draft
if (!gEditingDraft && gAutoSaveKickedIn)
RemoveDraft();
break;