diff --git a/src/background/storageMigrations.ts b/src/background/storageMigrations.ts index 4691255b..02684339 100644 --- a/src/background/storageMigrations.ts +++ b/src/background/storageMigrations.ts @@ -7,27 +7,8 @@ function crossedUpgrade(previousVersion: string, boundary: string): boolean { return prev != null && curr != null && !semver.lt(curr, boundary) && semver.lt(prev, boundary); } -/** One-time storage patches when crossing 3.6.5 / 3.6.6 / 3.7.0 / 3.7.7 (see git history on main). */ +/** One-time storage patches when crossing 3.6.6 / 3.7.0 / 3.7.7 (see git history on main). */ export async function runStorageMigrations(previousVersion: string): Promise { - if (crossedUpgrade(previousVersion, "3.6.5")) { - try { - const key = "plugin.global-search.settings"; - const got = await browser.storage.local.get(key); - const existing = (got[key] ?? {}) as Record; - await browser.storage.local.set({ - [key]: { - ...existing, - enabled: true, - transparencyEffects: true, - runIndexingOnLoad: true, - passiveIndexing: true, - }, - }); - } catch (e) { - console.warn("[BetterSEQTA+] Global Search 3.6.5 settings migration failed:", e); - } - } - if (crossedUpgrade(previousVersion, "3.6.6")) { try { await browser.storage.local.set({ themeOfTheMonthDisabled: false }); diff --git a/src/seqta/utils/performanceMode.ts b/src/seqta/utils/performanceMode.ts index 37e7281d..fe13bcb8 100644 --- a/src/seqta/utils/performanceMode.ts +++ b/src/seqta/utils/performanceMode.ts @@ -1,4 +1,3 @@ -import browser from "@/lib/browser"; import { settingsState } from "@/seqta/utils/listeners/settingsState"; import { removeAnimatedBackgroundLayers } from "@/plugins/built-in/animatedBackground/backgroundLayers"; import { applySidebarLook } from "@/seqta/ui/sidebar/sidebarStyles"; @@ -101,20 +100,6 @@ async function syncPerformanceModePlugins(): Promise { if (isPerformanceMode()) { removeAnimatedBackgroundLayers(); window.dispatchEvent(new CustomEvent("betterseqta-background-music-stop")); - } else { - const searchSettings = await browser.storage.local.get("plugin.global-search.settings"); - const gs = searchSettings["plugin.global-search.settings"] as - | { runIndexingOnLoad?: boolean } - | undefined; - if (gs?.runIndexingOnLoad && isPluginAllowedInPerformanceMode("global-search")) { - const { runIndexing } = - await import("@/plugins/built-in/globalSearch/src/indexing/indexer"); - if (typeof requestIdleCallback === "function") { - requestIdleCallback(() => void runIndexing(), { timeout: 5000 }); - } else { - setTimeout(() => void runIndexing(), 2000); - } - } } } catch (error) { console.warn("[BetterSEQTA+] Performance mode plugin sync failed:", error);