diff options
author | Matt A. Tobin <email@mattatobin.com> | 2020-07-27 19:17:14 -0400 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2020-07-27 19:17:14 -0400 |
commit | 16cbbacc92b39a001c1eb3d4b9d1dd6cfe1c987f (patch) | |
tree | e0121b6c02dc1692de6174048e8681cd1e8ff58a /mailnews | |
parent | 5d96da525fc22dfa5fecced37faa10ebdc234f7e (diff) | |
download | aura-central-16cbbacc92b39a001c1eb3d4b9d1dd6cfe1c987f.tar.gz |
[MailNews] Allow ordering of accounts to respect mail.accountmanager.accounts
Diffstat (limited to 'mailnews')
-rw-r--r-- | mailnews/base/util/folderUtils.jsm | 9 | ||||
-rw-r--r-- | mailnews/mailnews.js | 1 |
2 files changed, 9 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; } /** diff --git a/mailnews/mailnews.js b/mailnews/mailnews.js index 7ebe2eaa7..7aa83c625 100644 --- a/mailnews/mailnews.js +++ b/mailnews/mailnews.js @@ -431,6 +431,7 @@ pref("mail.default_sendlater_uri", "mailbox://nobody@Local%20Folders/Unsent%20Me pref("mail.smtpservers", ""); pref("mail.accountmanager.accounts", ""); +pref("mail.accountmanager.accounts.ordered", true); // Last used account key value pref("mail.account.lastKey", 0); |