From d06a7a9bb689849b2b7beced2606ceb98513f4bb Mon Sep 17 00:00:00 2001 From: Fuwn Date: Wed, 15 Apr 2026 01:18:00 +0000 Subject: feat(cache): instant list revalidation from command palette and debug menu Replaces one-shot boolean revalidateAnime with a counter store so multiple components can subscribe without race conditions. Adds revalidateManga store and reactive refresh blocks to DueAnimeList and MangaListTemplate. Extracts shared invalidateListCaches function used by both the command palette action and the debug settings button. Renames palette item to "Refresh" and debug button to "Invalidate". --- src/lib/Settings/Categories/Debug.svelte | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'src/lib/Settings') diff --git a/src/lib/Settings/Categories/Debug.svelte b/src/lib/Settings/Categories/Debug.svelte index c6b16086..ad388fee 100644 --- a/src/lib/Settings/Categories/Debug.svelte +++ b/src/lib/Settings/Categories/Debug.svelte @@ -7,19 +7,7 @@ import { options } from "$lib/Notification/options"; import locale from "$stores/locale"; import SettingCheckboxToggle from "../SettingCheckboxToggle.svelte"; import localforage from "localforage"; -import { browser } from "$app/environment"; - -const clearCaches = async () => { - if (!browser) return; - - await localforage.removeItem("anime"); - await localforage.removeItem("manga"); - addNotification( - options({ - heading: "Anime and manga list caches successfully cleared", - }), - ); -}; +import { invalidateListCaches } from "$lib/Media/invalidate"; @@ -29,7 +17,7 @@ const clearCaches = async () => { />
- + -- cgit v1.2.3