diff options
Diffstat (limited to 'src/lib/List/Manga')
| -rw-r--r-- | src/lib/List/Manga/MangaListTemplate.svelte | 22 |
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); }); |