[MailNews] Allow setting "Local Folders" as always the first displayed account

This commit is contained in:
Matt A. Tobin 2020-07-27 19:18:35 -04:00 committed by Roy Tam
commit b72d30186a
2 changed files with 5 additions and 0 deletions

View file

@ -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;
}