From adab28447d86356fe395254af8beb516a89cca44 Mon Sep 17 00:00:00 2001 From: Bauke Date: Wed, 16 Mar 2022 11:20:29 +0100 Subject: [PATCH] Update the badge on start up. --- source/background-scripts/initialize.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/background-scripts/initialize.ts b/source/background-scripts/initialize.ts index f7495d8..638bb80 100644 --- a/source/background-scripts/initialize.ts +++ b/source/background-scripts/initialize.ts @@ -1,5 +1,7 @@ import browser from 'webextension-polyfill'; +import {Settings} from '../settings/settings.js'; +import {updateBadge} from '../utilities/badge.js'; import {History} from '../utilities/history.js'; import {browserActionClicked} from './browser-action.js'; import {initializeContextMenus} from './context-menus.js'; @@ -7,6 +9,7 @@ import {initializeContextMenus} from './context-menus.js'; browser.runtime.onStartup.addListener(async () => { console.debug('Clearing history.'); await History.clear(); + await updateBadge(await Settings.fromSyncStorage()); }); browser.browserAction.onClicked.addListener(browserActionClicked);