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