1
0
mirror of https://github.com/moparisthebest/mail synced 2024-12-24 00:08:48 -05:00

Merge remote-tracking branch 'origin/dev/WO-84'

This commit is contained in:
Tankred Hase 2013-11-11 16:16:28 +01:00
commit c397210c24

View File

@ -103,7 +103,31 @@ define(function(require) {
return; 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(); removeLocalAndShowNext();
removeRemote(); removeRemote();
@ -123,9 +147,6 @@ define(function(require) {
} }
function removeRemote() { function removeRemote() {
var trashFolder = _.findWhere($scope.folders, {
type: 'Trash'
});
if (getFolder() === trashFolder) { if (getFolder() === trashFolder) {
emailDao.imapDeleteMessage({ emailDao.imapDeleteMessage({
folder: getFolder().path, folder: getFolder().path,