aboutsummaryrefslogtreecommitdiff
path: root/src/stores
diff options
context:
space:
mode:
authorFuwn <[email protected]>2026-04-15 01:18:00 +0000
committerFuwn <[email protected]>2026-04-15 01:18:00 +0000
commitd06a7a9bb689849b2b7beced2606ceb98513f4bb (patch)
tree8f54fc3fa12c70b21bf4bf421608c9b9400064da /src/stores
parentfeat(command-palette): add clear anime and manga list caches action (diff)
downloaddue.moe-d06a7a9bb689849b2b7beced2606ceb98513f4bb.tar.xz
due.moe-d06a7a9bb689849b2b7beced2606ceb98513f4bb.zip
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".
Diffstat (limited to 'src/stores')
-rw-r--r--src/stores/revalidateAnime.ts2
-rw-r--r--src/stores/revalidateManga.ts5
2 files changed, 6 insertions, 1 deletions
diff --git a/src/stores/revalidateAnime.ts b/src/stores/revalidateAnime.ts
index acbbf367..db3ccb2d 100644
--- a/src/stores/revalidateAnime.ts
+++ b/src/stores/revalidateAnime.ts
@@ -1,5 +1,5 @@
import { writable } from "svelte/store";
-const revalidateAnime = writable<boolean>(false);
+const revalidateAnime = writable<number>(0);
export default revalidateAnime;
diff --git a/src/stores/revalidateManga.ts b/src/stores/revalidateManga.ts
new file mode 100644
index 00000000..b72ea1af
--- /dev/null
+++ b/src/stores/revalidateManga.ts
@@ -0,0 +1,5 @@
+import { writable } from "svelte/store";
+
+const revalidateManga = writable<number>(0);
+
+export default revalidateManga;