Debounce updateAllTabsIcon
This commit is contained in:
parent
dc5f3e209f
commit
81e4823f46
|
@ -150,11 +150,7 @@ prefs.subscribe([
|
|||
'badgeDisabled',
|
||||
'badgeNormal',
|
||||
'iconset',
|
||||
], () =>
|
||||
queryTabs().then(tabs =>
|
||||
tabs.map(t => updateIcon({tab: t}))
|
||||
)
|
||||
);
|
||||
], () => debounce(updateAllTabsIcon));
|
||||
|
||||
// *************************************************************************
|
||||
chrome.runtime.onInstalled.addListener(({reason}) => {
|
||||
|
@ -534,3 +530,9 @@ function onRuntimeMessage(msg, sender, sendResponse) {
|
|||
respond(result);
|
||||
}
|
||||
}
|
||||
|
||||
function updateAllTabsIcon() {
|
||||
return queryTabs().then(tabs =>
|
||||
tabs.map(t => updateIcon({tab: t}))
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user