diff options
| author | Fuwn <[email protected]> | 2024-11-18 19:54:38 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-11-18 19:54:38 -0800 |
| commit | 64fa75c72f3d2039c056191914378cb485fcae51 (patch) | |
| tree | d2e4719df8f72cc1bd557ea466e0e8bc09a62a86 /src | |
| parent | refactor(authorised): move authorised user functionality to module (diff) | |
| download | due.moe-64fa75c72f3d2039c056191914378cb485fcae51.tar.xz due.moe-64fa75c72f3d2039c056191914378cb485fcae51.zip | |
fix(CleanMangaList): total chapter count calculation overlap
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/List/Manga/CleanMangaList.svelte | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lib/List/Manga/CleanMangaList.svelte b/src/lib/List/Manga/CleanMangaList.svelte index 73005d73..7a44a882 100644 --- a/src/lib/List/Manga/CleanMangaList.svelte +++ b/src/lib/List/Manga/CleanMangaList.svelte @@ -31,7 +31,11 @@ let serviceStatusResponse: Promise<Response>; let totalEpisodeDueCount = media - .map((manga) => (manga.episodes || 1) - (manga.mediaListEntry?.progress || 0)) + .map((manga) => { + if (!due && !$settings.displayTotalEpisodes) return 1; + + return (manga.episodes || 1) - (manga.mediaListEntry?.progress || 0); + }) .reduce((a, b) => a + b, 0); onMount(() => { @@ -49,7 +53,7 @@ {#if authorised} <ListTitle - count={($settings.displayTotalDueEpisodes && due) || $settings.displayTotalEpisodes + count={$settings.displayTotalDueEpisodes || $settings.displayTotalEpisodes ? totalEpisodeDueCount : media.length} time={endTime / 1000} |