parent
707220bed3
commit
c1ed49d4ba
1
NEWS
1
NEWS
|
@ -7,6 +7,7 @@ Enhancements
|
|||
|
||||
Bug fixes
|
||||
- [sogo-tool] fixed "manage-acl unsubscribe" command (#4591)
|
||||
- [web] fixed handling of collapsed/expanded mail accounts (#4541)
|
||||
|
||||
4.0.4 (2018-10-23)
|
||||
------------------
|
||||
|
|
|
@ -88,7 +88,7 @@
|
|||
ng-show="account.$expanded"
|
||||
ng-class="{ 'md-warn': account.$quota.percent > 70 }">{{account.$quota.description}}</div>
|
||||
</div>
|
||||
<md-virtual-repeat-container ng-class="{ 'md-flex': account.$expanded }">
|
||||
<md-virtual-repeat-container class="md-flex">
|
||||
<md-list>
|
||||
<md-list-item
|
||||
class="sg-mailbox-list-item md-clickable md-default-theme md-background md-hue-1"
|
||||
|
|
|
@ -98,7 +98,10 @@
|
|||
* @returns the number of mailboxes in the account
|
||||
*/
|
||||
Account.prototype.getLength = function() {
|
||||
return this.$flattenMailboxes().length;
|
||||
if (this.$expanded)
|
||||
return this.$flattenMailboxes().length;
|
||||
else
|
||||
return 0;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
/**
|
||||
* @ngInject
|
||||
*/
|
||||
MailboxesController.$inject = ['$scope', '$state', '$transitions', '$timeout', '$window', '$mdMedia', '$mdSidenav', '$mdDialog', '$mdToast', 'sgConstant', 'sgFocus', 'encodeUriFilter', 'Dialog', 'sgSettings', 'sgHotkeys', 'Account', 'Mailbox', 'VirtualMailbox', 'User', 'Preferences', 'stateAccounts'];
|
||||
function MailboxesController($scope, $state, $transitions, $timeout, $window, $mdMedia, $mdSidenav, $mdDialog, $mdToast, sgConstant, focus, encodeUriFilter, Dialog, Settings, sgHotkeys, Account, Mailbox, VirtualMailbox, User, Preferences, stateAccounts) {
|
||||
MailboxesController.$inject = ['$scope', '$state', '$transitions', '$timeout', '$window', '$mdUtil', '$mdMedia', '$mdSidenav', '$mdDialog', '$mdToast', 'sgConstant', 'sgFocus', 'encodeUriFilter', 'Dialog', 'sgSettings', 'sgHotkeys', 'Account', 'Mailbox', 'VirtualMailbox', 'User', 'Preferences', 'stateAccounts'];
|
||||
function MailboxesController($scope, $state, $transitions, $timeout, $window, $mdUtil, $mdMedia, $mdSidenav, $mdDialog, $mdToast, sgConstant, focus, encodeUriFilter, Dialog, Settings, sgHotkeys, Account, Mailbox, VirtualMailbox, User, Preferences, stateAccounts) {
|
||||
var vm = this,
|
||||
account,
|
||||
mailbox,
|
||||
|
@ -142,7 +142,12 @@
|
|||
|
||||
this.toggleAccountState = function (account) {
|
||||
account.$expanded = !account.$expanded;
|
||||
account.$flattenMailboxes({ reload: true, saveState: true });
|
||||
if (!this.debounceSaveState) {
|
||||
this.debounceSaveState = $mdUtil.debounce(function () {
|
||||
account.$flattenMailboxes({ reload: true, saveState: true });
|
||||
}, 1000);
|
||||
}
|
||||
this.debounceSaveState();
|
||||
};
|
||||
|
||||
this.subscribe = function(account) {
|
||||
|
|
Loading…
Reference in New Issue