aboutsummaryrefslogtreecommitdiff
path: root/src/lib/List/Manga
diff options
context:
space:
mode:
authorFuwn <[email protected]>2026-04-14 18:19:54 -0700
committerGitHub <[email protected]>2026-04-14 18:19:54 -0700
commitf3ac4e6051d5b18c26d5a876ce12ddd1fd0f7107 (patch)
tree8f54fc3fa12c70b21bf4bf421608c9b9400064da /src/lib/List/Manga
parentfix(ui): balance homepage media panels (diff)
parentfeat(cache): instant list revalidation from command palette and debug menu (diff)
downloaddue.moe-f3ac4e6051d5b18c26d5a876ce12ddd1fd0f7107.tar.xz
due.moe-f3ac4e6051d5b18c26d5a876ce12ddd1fd0f7107.zip
Merge pull request #3 from Fuwn/feat/instant-cache-invalidation
feat(cache): instant list revalidation from command palette and debug menu
Diffstat (limited to 'src/lib/List/Manga')
-rw-r--r--src/lib/List/Manga/MangaListTemplate.svelte22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/lib/List/Manga/MangaListTemplate.svelte b/src/lib/List/Manga/MangaListTemplate.svelte
index 52649098..df894910 100644
--- a/src/lib/List/Manga/MangaListTemplate.svelte
+++ b/src/lib/List/Manga/MangaListTemplate.svelte
@@ -19,6 +19,7 @@ import identity from "$stores/identity";
import lastPruneTimes from "$stores/lastPruneTimes";
import locale from "$stores/locale";
import manga from "$stores/manga";
+import revalidateManga from "$stores/revalidateManga";
import settings from "$stores/settings";
import ListTitle from "../ListTitle.svelte";
import CleanMangaList from "./CleanMangaList.svelte";
@@ -141,6 +142,27 @@ $: if (
)
restartKeyCacher(Math.max($settings.cacheMangaMinutes, 5));
+let lastMangaRevalidation = 0;
+
+$: if (!dummy && $revalidateManga > lastMangaRevalidation) {
+ lastMangaRevalidation = $revalidateManga;
+
+ startTime = performance.now();
+ endTime = -1;
+
+ mangaLists = mediaListCollection(
+ user,
+ $identity,
+ Type.Manga,
+ $manga,
+ $lastPruneTimes.manga,
+ {
+ forcePrune: true,
+ addNotification,
+ },
+ );
+}
+
onDestroy(() => {
if (keyCacher) clearInterval(keyCacher);
});