mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-09-20 15:45:55 +08:00
Draft delete confirmation when editing it (#1081)
This commit is contained in:
parent
a0a9acf9d9
commit
b1f85ef41c
|
@ -334,8 +334,21 @@
|
|||
|
||||
this.deleteCommand = Utils.createCommand(this, function () {
|
||||
|
||||
require('App/User').default.deleteMessagesFromFolderWithoutCheck(this.draftFolder(), [this.draftUid()]);
|
||||
kn.hideScreenPopup(ComposePopupView);
|
||||
var
|
||||
self = this,
|
||||
PopupsAskViewModel = require('View/Popup/Ask')
|
||||
;
|
||||
|
||||
if (!kn.isPopupVisible(PopupsAskViewModel) && this.modalVisibility())
|
||||
{
|
||||
kn.showScreenPopup(PopupsAskViewModel, [Translator.i18n('POPUPS_ASK/DESC_WANT_DELETE_MESSAGES'), function () {
|
||||
if (self.modalVisibility())
|
||||
{
|
||||
require('App/User').default.deleteMessagesFromFolderWithoutCheck(self.draftFolder(), [self.draftUid()]);
|
||||
kn.hideScreenPopup(ComposePopupView);
|
||||
}
|
||||
}]);
|
||||
}
|
||||
|
||||
}, function () {
|
||||
return this.isDraftFolderMessage();
|
||||
|
|
Loading…
Reference in a new issue