fix(preferences(js)): handle cancellation of IMAP account edition

pull/282/head
Francis Lachapelle 2020-06-22 17:31:54 -04:00
parent 7494bb3ae6
commit ee904ac616
2 changed files with 6 additions and 2 deletions

View File

@ -136,7 +136,8 @@
};
this.editMailAccount = function(event, index, form) {
var account = new Account(this.preferences.defaults.AuxiliaryMailAccounts[index]);
var data = _.cloneDeep(this.preferences.defaults.AuxiliaryMailAccounts[index]);
var account = new Account(data);
$mdDialog.show({
controller: 'AccountDialogController',
controllerAs: '$AccountDialogController',
@ -151,7 +152,7 @@
}).then(function() {
vm.preferences.defaults.AuxiliaryMailAccounts[index] = account.$omit();
form.$setDirty();
});
}).catch(_.noop); // Cancel
};
this.removeMailAccount = function(index, form) {

View File

@ -199,6 +199,9 @@ div.md-tile-left {
.#{$md}-subhead {
@extend .#{$md}-body-1;
white-space: pre;
&.md-block {
display: block;
}
}
.#{$md}-body {
@extend .#{$md}-caption;