1
0
mirror of https://github.com/moparisthebest/mail synced 2024-11-26 10:52:17 -05:00

[WO-84] confirm deletion from trash

This commit is contained in:
Felix Hammerl 2013-11-11 15:53:34 +01:00
parent 4744b60861
commit 9078a0ce51

View File

@ -103,7 +103,31 @@ define(function(require) {
return;
}
var index;
var index, trashFolder;
trashFolder = _.findWhere($scope.folders, {
type: 'Trash'
});
if (getFolder() === trashFolder) {
$scope.state.dialog = {
open: true,
title: 'Remove permanently?',
message: 'Do you want to remove this message permanently?',
callback: function(ok) {
$scope.state.dialog.open = false;
if (!ok) {
return;
}
removeLocalAndShowNext();
removeRemote();
}
};
return;
}
removeLocalAndShowNext();
removeRemote();
@ -123,9 +147,6 @@ define(function(require) {
}
function removeRemote() {
var trashFolder = _.findWhere($scope.folders, {
type: 'Trash'
});
if (getFolder() === trashFolder) {
emailDao.imapDeleteMessage({
folder: getFolder().path,