diff --git a/src/content/settings/watchSettingsChanges.ts b/src/content/settings/watchSettingsChanges.ts index 7a4b6ded..29165ac5 100644 --- a/src/content/settings/watchSettingsChanges.ts +++ b/src/content/settings/watchSettingsChanges.ts @@ -11,7 +11,20 @@ import { notify, notifyTogglesStatus } from "../notify/notify"; import { addUrlToTitle } from "../utils/addUrlToTitle"; import { cacheSettings, getCachedSetting } from "./cacheSettings"; -async function handleSettingsChanges(changes: browser.Storage.StorageChange) { +async function handleSettingsChanges( + changes: Record +) { + let hasActuallyChanged = false; + + for (const key of Object.keys(changes)) { + const change = changes[key]; + if (change && change.oldValue !== change.newValue) { + hasActuallyChanged = true; + } + } + + if (!hasActuallyChanged) return; + await cacheSettings(); const isToggleChange = Object.keys(changes).some((key) =>