immich/web/src/lib/stores/search.svelte.ts
Ben 92f0973a46
fix(web): reset search history after logout (#17534)
fix(web): reset search suggestions after logout
2025-04-10 20:34:45 +00:00

13 lines
332 B
TypeScript

class SearchStore {
savedSearchTerms = $state<string[]>([]);
isSearchEnabled = $state(false);
preventRaceConditionSearchBar = $state(false);
clearCache() {
this.savedSearchTerms = [];
this.isSearchEnabled = false;
this.preventRaceConditionSearchBar = false;
}
}
export const searchStore = new SearchStore();