mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Draft delete confirmation when editing it (#1081)
This commit is contained in:
parent
a0a9acf9d9
commit
b1f85ef41c
1 changed files with 15 additions and 2 deletions
|
|
@ -334,8 +334,21 @@
|
||||||
|
|
||||||
this.deleteCommand = Utils.createCommand(this, function () {
|
this.deleteCommand = Utils.createCommand(this, function () {
|
||||||
|
|
||||||
require('App/User').default.deleteMessagesFromFolderWithoutCheck(this.draftFolder(), [this.draftUid()]);
|
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);
|
kn.hideScreenPopup(ComposePopupView);
|
||||||
|
}
|
||||||
|
}]);
|
||||||
|
}
|
||||||
|
|
||||||
}, function () {
|
}, function () {
|
||||||
return this.isDraftFolderMessage();
|
return this.isDraftFolderMessage();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue