diff options
author | Matt A. Tobin <email@mattatobin.com> | 2020-07-27 19:17:14 -0400 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2020-07-28 15:50:09 +0000 |
commit | 4329ae3337172a9fd126986c90b09a9eb3dc179b (patch) | |
tree | 51efb8b1239d61c78d2ade3525ca7cbae10e891e /mailnews/base/util/folderUtils.jsm | |
parent | ad453f0b28bf1ac30f889abf3ae38e95315295b0 (diff) | |
download | UXP-4329ae3337172a9fd126986c90b09a9eb3dc179b.tar UXP-4329ae3337172a9fd126986c90b09a9eb3dc179b.tar.gz UXP-4329ae3337172a9fd126986c90b09a9eb3dc179b.tar.lz UXP-4329ae3337172a9fd126986c90b09a9eb3dc179b.tar.xz UXP-4329ae3337172a9fd126986c90b09a9eb3dc179b.zip |
[MailNews] Allow ordering of accounts to respect mail.accountmanager.accounts
Diffstat (limited to 'mailnews/base/util/folderUtils.jsm')
-rw-r--r-- | mailnews/base/util/folderUtils.jsm | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/mailnews/base/util/folderUtils.jsm b/mailnews/base/util/folderUtils.jsm index 62fb7700b..9d2918a7a 100644 --- a/mailnews/base/util/folderUtils.jsm +++ b/mailnews/base/util/folderUtils.jsm @@ -12,6 +12,7 @@ this.EXPORTED_SYMBOLS = ["getFolderProperties", "getSpecialFolderString", Components.utils.import("resource:///modules/mailServices.js"); Components.utils.import("resource:///modules/iteratorUtils.jsm"); +Components.utils.import("resource://gre/modules/Services.jsm"); /** * Returns a string representation of a folder's "special" type. @@ -169,8 +170,14 @@ function allAccountsSorted(aExcludeIMAccounts) { return a.incomingServer.type != "im"; }); } + + // Sort the accounts else will respect the order in mail.accountmanager.accounts + if (Services.prefs.getBoolPref("mail.accountmanager.accounts.ordered", true)) { + accountList = accountList.sort(compareAccounts); + } + - return accountList.sort(compareAccounts); + return accountList; } /** |