mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-12-06 19:56:45 +10:30
Merge pull request #501 from maxwakelin8-a11y/perf/global-search-lazy-reset
perf: load Global Search reset code on click instead of at startup
This commit is contained in:
1 file changed
+3
-1
@@ -7,7 +7,6 @@ import {
|
||||
} from "../../core/settingsHelpers";
|
||||
import { isSeqtaEngageExperience, isSeqtaLoginPage } from "@/seqta/utils/isSeqtaEngage";
|
||||
import styles from "./src/core/styles.css?inline";
|
||||
import { resetSearchIndexes, notifyOpenTabsResetSearchIndex } from "./src/indexing/resetIndexes";
|
||||
import {
|
||||
formatHotkeyForDisplay,
|
||||
getDefaultSearchHotkey,
|
||||
@@ -53,6 +52,9 @@ const settings = defineSettings({
|
||||
if (!confirmed) return;
|
||||
|
||||
try {
|
||||
// Loaded on click: a static import pulled the ~1 MB indexer chunk into every page load.
|
||||
const { resetSearchIndexes, notifyOpenTabsResetSearchIndex } =
|
||||
await import("./src/indexing/resetIndexes");
|
||||
await notifyOpenTabsResetSearchIndex();
|
||||
await resetSearchIndexes();
|
||||
alert("Search index and storage were reset.\n\nReload this tab to regenerate the index.");
|
||||
|
||||
Reference in new issue
Block a user