From 0d0e1b4dc07f2768ac98805a1f34b70bb18caa83 Mon Sep 17 00:00:00 2001 From: eight Date: Thu, 4 Oct 2018 19:20:36 +0800 Subject: [PATCH] Fix: update all icons when some prefs changed --- background/background.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/background/background.js b/background/background.js index 5b8fe7dc..c5bbb902 100644 --- a/background/background.js +++ b/background/background.js @@ -144,6 +144,18 @@ prefs.subscribe(['iconset'], () => styles: {}, })); +prefs.subscribe([ + 'show-badge', + 'disableAll', + 'badgeDisabled', + 'badgeNormal', + 'iconset', +], () => + queryTabs().then(tabs => + tabs.map(t => updateIcon({tab: t})) + ) +) + // ************************************************************************* chrome.runtime.onInstalled.addListener(({reason}) => { if (reason !== 'update') return;