mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-18 11:38:53 +00:00
(js) Fix automatic expansion of mail account
This commit is contained in:
@@ -133,6 +133,7 @@
|
||||
else {
|
||||
return Account.$Mailbox.$find(this).then(function(data) {
|
||||
_this.$mailboxes = data;
|
||||
_this.$expanded = false;
|
||||
|
||||
// Set expanded folders from user's settings
|
||||
Account.$Preferences.ready().then(function() {
|
||||
@@ -151,11 +152,12 @@
|
||||
expandedFolders = angular.fromJson(Account.$Preferences.settings.Mail.ExpandedFolders);
|
||||
else
|
||||
expandedFolders = Account.$Preferences.settings.Mail.ExpandedFolders;
|
||||
_this.$expanded = (expandedFolders.indexOf('/' + _this.id) >= 0) || Account.$accounts.length == 1;
|
||||
_this.$expanded = (expandedFolders.indexOf('/' + _this.id) >= 0);
|
||||
if (expandedFolders.length > 0) {
|
||||
_visit(_this.$mailboxes);
|
||||
}
|
||||
}
|
||||
_this.$expanded |= (Account.$accounts.length == 1); // Always expand single account
|
||||
_this.$flattenMailboxes({reload: true});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user