summaryrefslogtreecommitdiffstats
path: root/mailnews/base
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2020-07-27 19:17:14 -0400
committerMatt A. Tobin <email@mattatobin.com>2020-07-27 19:17:14 -0400
commit39be34c06f9dc980a7ea11576365733fb83c342c (patch)
treee0121b6c02dc1692de6174048e8681cd1e8ff58a /mailnews/base
parent1977b8de3e4d0a2af9d34fa90b5584e439155fcb (diff)
downloadUXP-39be34c06f9dc980a7ea11576365733fb83c342c.tar
UXP-39be34c06f9dc980a7ea11576365733fb83c342c.tar.gz
UXP-39be34c06f9dc980a7ea11576365733fb83c342c.tar.lz
UXP-39be34c06f9dc980a7ea11576365733fb83c342c.tar.xz
UXP-39be34c06f9dc980a7ea11576365733fb83c342c.zip
[MailNews] Allow ordering of accounts to respect mail.accountmanager.accounts
Diffstat (limited to 'mailnews/base')
-rw-r--r--mailnews/base/util/folderUtils.jsm9
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;
}
/**