summaryrefslogtreecommitdiffstats
path: root/mailnews/base/util/folderUtils.jsm
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2020-07-27 19:18:35 -0400
committerMoonchild <moonchild@palemoon.org>2020-07-28 15:50:20 +0000
commit4a960879c858a96c8f77caeadb558d7eeb487756 (patch)
treeca29786f112d7e3078b066299cedf9fff84333bc /mailnews/base/util/folderUtils.jsm
parent4329ae3337172a9fd126986c90b09a9eb3dc179b (diff)
downloadUXP-4a960879c858a96c8f77caeadb558d7eeb487756.tar
UXP-4a960879c858a96c8f77caeadb558d7eeb487756.tar.gz
UXP-4a960879c858a96c8f77caeadb558d7eeb487756.tar.lz
UXP-4a960879c858a96c8f77caeadb558d7eeb487756.tar.xz
UXP-4a960879c858a96c8f77caeadb558d7eeb487756.zip
[MailNews] Allow setting "Local Folders" as always the first displayed account
Diffstat (limited to 'mailnews/base/util/folderUtils.jsm')
-rw-r--r--mailnews/base/util/folderUtils.jsm4
1 files changed, 4 insertions, 0 deletions
diff --git a/mailnews/base/util/folderUtils.jsm b/mailnews/base/util/folderUtils.jsm
index 9d2918a7a..06e8e4bf2 100644
--- a/mailnews/base/util/folderUtils.jsm
+++ b/mailnews/base/util/folderUtils.jsm
@@ -176,6 +176,10 @@ function allAccountsSorted(aExcludeIMAccounts) {
accountList = accountList.sort(compareAccounts);
}
+ // Set "Local Folders" as always the first displayed account
+ if (Services.prefs.getBoolPref("mail.accountmanager.localfolderfirst", false)) {
+ accountList.unshift(accountList.splice(accountList.findIndex(item => item.key === "account1"), 1)[0]);
+ }
return accountList;
}