Update the badge on start up.
This commit is contained in:
parent
1489da6101
commit
adab28447d
|
@ -1,5 +1,7 @@
|
||||||
import browser from 'webextension-polyfill';
|
import browser from 'webextension-polyfill';
|
||||||
|
|
||||||
|
import {Settings} from '../settings/settings.js';
|
||||||
|
import {updateBadge} from '../utilities/badge.js';
|
||||||
import {History} from '../utilities/history.js';
|
import {History} from '../utilities/history.js';
|
||||||
import {browserActionClicked} from './browser-action.js';
|
import {browserActionClicked} from './browser-action.js';
|
||||||
import {initializeContextMenus} from './context-menus.js';
|
import {initializeContextMenus} from './context-menus.js';
|
||||||
|
@ -7,6 +9,7 @@ import {initializeContextMenus} from './context-menus.js';
|
||||||
browser.runtime.onStartup.addListener(async () => {
|
browser.runtime.onStartup.addListener(async () => {
|
||||||
console.debug('Clearing history.');
|
console.debug('Clearing history.');
|
||||||
await History.clear();
|
await History.clear();
|
||||||
|
await updateBadge(await Settings.fromSyncStorage());
|
||||||
});
|
});
|
||||||
|
|
||||||
browser.browserAction.onClicked.addListener(browserActionClicked);
|
browser.browserAction.onClicked.addListener(browserActionClicked);
|
||||||
|
|
Loading…
Reference in New Issue