From 59c609aa089248cbb4d4106e9f3c2faa807aed5e Mon Sep 17 00:00:00 2001 From: Fuwn Date: Sat, 28 Mar 2026 08:45:27 +0000 Subject: fix(cache): restore instant filters and shared AniList cache --- src/lib/List/Manga/CleanMangaList.svelte | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'src/lib/List/Manga') diff --git a/src/lib/List/Manga/CleanMangaList.svelte b/src/lib/List/Manga/CleanMangaList.svelte index db5778da..9727c26d 100644 --- a/src/lib/List/Manga/CleanMangaList.svelte +++ b/src/lib/List/Manga/CleanMangaList.svelte @@ -50,10 +50,15 @@ let totalEpisodeDueCount = media let lists: string[] = []; const filterKind = due ? "due" : "completed"; const filterKey = `${filterKind}MangaListFilter`; +let selectedList = "All"; -$: selectedList = disableFilter - ? "All" - : ($stateBin[filterKey] as string) || "All"; +$: { + const persistedList = disableFilter + ? "All" + : ($stateBin[filterKey] as string) || "All"; + + if (persistedList !== selectedList) selectedList = persistedList; +} $: lists = Array.from( new Set( @@ -69,6 +74,11 @@ $: filteredMedia = ? media : media.filter((m) => m.mediaListEntry?.customLists?.[selectedList]); +const updateSelectedList = () => { + if (!disableFilter && $stateBin[filterKey] !== selectedList) + $stateBin[filterKey] = selectedList; +}; + onMount(async () => { serviceStatusResponse = fetch(proxy("https://api.mangadex.org/ping")); @@ -159,7 +169,7 @@ const increment = (manga: Media) => { You can re-enable it later in the Settings. {:else if $settings.displayMediaListFilter && !disableFilter} - {#each lists as list} -- cgit v1.2.3