mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 20:19:22 +03:00
Additional accounts storage optimization
This commit is contained in:
parent
cdd1a8e778
commit
23ddda9194
6 changed files with 93 additions and 53 deletions
|
|
@ -40,7 +40,6 @@ SettingsAccounts.prototype.addNewAccount = function ()
|
|||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {AccountModel} oAccountToRemove
|
||||
*/
|
||||
SettingsAccounts.prototype.deleteAccount = function (oAccountToRemove)
|
||||
|
|
@ -59,8 +58,24 @@ SettingsAccounts.prototype.deleteAccount = function (oAccountToRemove)
|
|||
{
|
||||
this.accounts.remove(fRemoveAccount);
|
||||
|
||||
RL.remote().accountDelete(function () {
|
||||
RL.accountsAndIdentities();
|
||||
RL.remote().accountDelete(function (sResult, oData) {
|
||||
|
||||
if (Enums.StorageResultType.Success === sResult && oData &&
|
||||
oData.Result && oData.Reload)
|
||||
{
|
||||
kn.routeOff();
|
||||
kn.setHash(RL.link().root(), true);
|
||||
kn.routeOff();
|
||||
|
||||
_.defer(function () {
|
||||
window.location.reload();
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
RL.accountsAndIdentities();
|
||||
}
|
||||
|
||||
}, oAccountToRemove.email);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue