fix(preferences(js)): automatically expand newly created mail account

pull/283/head
Francis Lachapelle 2020-07-03 12:31:48 -04:00
parent 443a41b770
commit f1ff8bfe1c
1 changed files with 6 additions and 0 deletions

View File

@ -135,7 +135,13 @@
mailCustomFromEnabled: $window.mailCustomFromEnabled
}
}).then(function() {
// Automatically expand the new mail account
if (!angular.isArray(vm.preferences.settings.Mail.ExpandedFolders)) {
vm.preferences.settings.Mail.ExpandedFolders = ['/0'];
}
vm.preferences.settings.Mail.ExpandedFolders.push('/' + index);
vm.preferences.defaults.AuxiliaryMailAccounts.push(account.$omit());
form.$setDirty();
});
};