aboutsummaryrefslogtreecommitdiff
path: root/src/lib/List/Manga/CleanMangaList.svelte
diff options
context:
space:
mode:
authorFuwn <[email protected]>2026-03-28 08:33:47 +0000
committerFuwn <[email protected]>2026-03-28 08:33:47 +0000
commit64ff00d5b3e93d780f2f3d65eb50595bafc1cb18 (patch)
treec44de213b7d6d541e3d7519d030094af4dd292a5 /src/lib/List/Manga/CleanMangaList.svelte
parentfix(anilist): fall back to persisted media list cache (diff)
downloaddue.moe-64ff00d5b3e93d780f2f3d65eb50595bafc1cb18.tar.xz
due.moe-64ff00d5b3e93d780f2f3d65eb50595bafc1cb18.zip
fix(anilist): restore completed list filters
Diffstat (limited to 'src/lib/List/Manga/CleanMangaList.svelte')
-rw-r--r--src/lib/List/Manga/CleanMangaList.svelte16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/lib/List/Manga/CleanMangaList.svelte b/src/lib/List/Manga/CleanMangaList.svelte
index cacc7006..db5778da 100644
--- a/src/lib/List/Manga/CleanMangaList.svelte
+++ b/src/lib/List/Manga/CleanMangaList.svelte
@@ -47,7 +47,15 @@ let totalEpisodeDueCount = media
return (manga.episodes || 1) - (manga.mediaListEntry?.progress || 0);
})
.reduce((a, b) => a + b, 0);
-const lists = Array.from(
+let lists: string[] = [];
+const filterKind = due ? "due" : "completed";
+const filterKey = `${filterKind}MangaListFilter`;
+
+$: selectedList = disableFilter
+ ? "All"
+ : ($stateBin[filterKey] as string) || "All";
+
+$: lists = Array.from(
new Set(
media
.flatMap((m) => Object.entries(m.mediaListEntry?.customLists ?? {}))
@@ -55,12 +63,6 @@ const lists = Array.from(
.map(([key]) => key),
),
);
-const filterKind = due ? "due" : "completed";
-const filterKey = `${filterKind}MangaListFilter`;
-
-$: selectedList = disableFilter
- ? "All"
- : ($stateBin[filterKey] as string) || "All";
$: filteredMedia =
selectedList === "All" || !$settings.displayMediaListFilter