Changeset d98906


Ignore:
Timestamp:
Oct 13, 2014, 11:25:35 AM (6 years ago)
Author:
rene <rene@…>
Branches:
ng_0.9
Children:
30b134a0e250d98615ebc65fa342562eed40a367, 767529
Parents:
25edf9
Message:

rearranged LastKey? decrease

File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/vI_account.js

    r25edf9 rd98906  
    233233            account.__removeAccountPrefs("account" + key);
    234234        }
    235        
    236         for (let acc = 0; acc < accounts.length; acc++) {
    237             let checkAccount = accounts[acc];
    238             if (account.__isVIdentityAccount(checkAccount)) {
    239                 account.__removeAccount(checkAccount);
    240             }
    241         }
    242235        Log.debug("done.")
    243236        account.__cleanupDirectories();
     
    258251        try {
    259252            prefroot.clearUserPref("mail.account." + key + ".vIdentity");
    260             // prevent useless increasing of lastKey https://bugzilla.mozilla.org/show_bug.cgi?id=485839
    261             var lastAccountKey = prefroot.getIntPref("mail.account.lastKey");
    262             if ("account" + lastAccountKey == key)
    263                 prefroot.setIntPref("mail.account.lastKey", lastAccountKey - 1);
    264253        }
    265254        catch (e) { };
     
    296285        // remove the account
    297286        account._AccountManager.removeAccount(checkAccount);
    298        
     287
     288        // prevent useless increasing of lastKey https://bugzilla.mozilla.org/show_bug.cgi?id=485839
     289        var lastAccountKey = prefroot.getIntPref("mail.account.lastKey");
     290        if ("account" + lastAccountKey == key)
     291            prefroot.setIntPref("mail.account.lastKey", lastAccountKey - 1);
     292
    299293        account.__removeAccountPrefs(key);
    300294    },
Note: See TracChangeset for help on using the changeset viewer.