Browse Source

Skip Feed, Chat and News accounts (dogfooding, issue 1).

1.1.101
Jorg Knobloch 2 years ago
parent
commit
622731f10d
2 changed files with 5 additions and 0 deletions
  1. +1
    -0
      .eslintrc.json
  2. +4
    -0
      chrome/content/options.js

+ 1
- 0
.eslintrc.json View File

@ -44,6 +44,7 @@
"new-cap": "off",
"no-bitwise": "off",
"no-console": "off",
"no-continue": "off",
"no-empty": "off",
"no-multi-spaces": "off",
"no-param-reassign": "off",


+ 4
- 0
chrome/content/options.js View File

@ -118,6 +118,10 @@ function loadAccounts() {
let accounts = [];
for (let account of fixIterator(MailServices.accounts.accounts, Ci.nsIMsgAccount)) {
const server = Services.prefs.getStringPref(`mail.account.${account.key}.server`);
if (!server) continue;
const type = Services.prefs.getStringPref(`mail.server.${server}.type`, "badtype");
if (["rss", "im", "nntp", "badtype"].includes(type)) continue; // Skip Feeds, Chat and News.
accounts.push({ key: account.key, identities: account.identities });
}
accounts


Loading…
Cancel
Save