Skip to content

Commit

Permalink
fix(preferences(js)): handle cancellation of IMAP account edition
Browse files Browse the repository at this point in the history
  • Loading branch information
cgx committed Jun 22, 2020
1 parent 7494bb3 commit ee904ac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 3 additions & 2 deletions UI/WebServerResources/js/Preferences/PreferencesController.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -151,7 +152,7 @@
}).then(function() {
vm.preferences.defaults.AuxiliaryMailAccounts[index] = account.$omit();
form.$setDirty();
});
}).catch(_.noop); // Cancel
};

this.removeMailAccount = function(index, form) {
Expand Down
3 changes: 3 additions & 0 deletions UI/WebServerResources/scss/components/list/list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ee904ac

Please sign in to comment.