summaryrefslogtreecommitdiff
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
committerMatt A. Tobin <email@mattatobin.com>2020-07-27 19:18:35 -0400
commit1862767254a2f5b88f95f4b193cf3a98aa1ad0eb (patch)
tree9bf1eb19ccb5b2ad60d9aca9e005852be87c6f05 /mailnews/base/util/folderUtils.jsm
parent16cbbacc92b39a001c1eb3d4b9d1dd6cfe1c987f (diff)
downloadaura-central-1862767254a2f5b88f95f4b193cf3a98aa1ad0eb.tar.gz
[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;
}