mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 20:19:22 +03:00
Cleanup additional accounts in system menu
This commit is contained in:
parent
64e77de103
commit
0d809dd574
7 changed files with 25 additions and 44 deletions
|
|
@ -419,24 +419,23 @@ class AppUser extends AbstractApp {
|
|||
IdentityUserStore.loading(false);
|
||||
|
||||
if (!iError) {
|
||||
const counts = {},
|
||||
const
|
||||
// counts = {},
|
||||
accounts = oData.Result.Accounts,
|
||||
mainEmail = SettingsGet('MainEmail');
|
||||
|
||||
if (isArray(accounts)) {
|
||||
AccountUserStore.accounts.forEach(oAccount =>
|
||||
counts[oAccount.email] = oAccount.count()
|
||||
);
|
||||
// AccountUserStore.accounts.forEach(oAccount => counts[oAccount.email] = oAccount.count());
|
||||
|
||||
delegateRunOnDestroy(AccountUserStore.accounts());
|
||||
|
||||
AccountUserStore.accounts(
|
||||
accounts.map(
|
||||
sValue => new AccountModel(sValue, counts[sValue])
|
||||
sValue => new AccountModel(sValue/*, counts[sValue]*/)
|
||||
)
|
||||
);
|
||||
// accounts.length &&
|
||||
AccountUserStore.accounts.unshift(new AccountModel(mainEmail, counts[mainEmail], false));
|
||||
AccountUserStore.accounts.unshift(new AccountModel(mainEmail/*, counts[mainEmail]*/, false));
|
||||
}
|
||||
|
||||
if (isArray(oData.Result.Identities)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue