summaryrefslogtreecommitdiffstats
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
commit9ac440aa71abf4357acea2efee1a26904468ea62 (patch)
tree9bf1eb19ccb5b2ad60d9aca9e005852be87c6f05
parent39be34c06f9dc980a7ea11576365733fb83c342c (diff)
downloadUXP-9ac440aa71abf4357acea2efee1a26904468ea62.tar
UXP-9ac440aa71abf4357acea2efee1a26904468ea62.tar.gz
UXP-9ac440aa71abf4357acea2efee1a26904468ea62.tar.lz
UXP-9ac440aa71abf4357acea2efee1a26904468ea62.tar.xz
UXP-9ac440aa71abf4357acea2efee1a26904468ea62.zip
[MailNews] Allow setting "Local Folders" as always the first displayed account
-rw-r--r--mailnews/base/util/folderUtils.jsm4
-rw-r--r--mailnews/mailnews.js1
2 files changed, 5 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;
}
diff --git a/mailnews/mailnews.js b/mailnews/mailnews.js
index 7aa83c625..afb5ac7f2 100644
--- a/mailnews/mailnews.js
+++ b/mailnews/mailnews.js
@@ -432,6 +432,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);
+pref("mail.accountmanager.localfolderfirst", false);
// Last used account key value
pref("mail.account.lastKey", 0);