From 4a960879c858a96c8f77caeadb558d7eeb487756 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Mon, 27 Jul 2020 19:18:35 -0400 Subject: [MailNews] Allow setting "Local Folders" as always the first displayed account --- mailnews/base/util/folderUtils.jsm | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'mailnews/base') 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; } -- cgit v1.2.3