diff options
| author | Fuwn <[email protected]> | 2023-08-27 17:40:50 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2023-08-27 17:40:50 -0700 |
| commit | 585bc0cb4993323c855cf4112491b5c55bfcd611 (patch) | |
| tree | 059ecc218841c8e84413871f7ef83b43bcf3fbf0 /src/lib | |
| parent | fix(manga): pruning (diff) | |
| download | due.moe-585bc0cb4993323c855cf4112491b5c55bfcd611.tar.xz due.moe-585bc0cb4993323c855cf4112491b5c55bfcd611.zip | |
feat(manga): chapter rounding
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/List/Due/MangaList.svelte | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/List/Due/MangaList.svelte b/src/lib/List/Due/MangaList.svelte index 91524bdc..113d4017 100644 --- a/src/lib/List/Due/MangaList.svelte +++ b/src/lib/List/Due/MangaList.svelte @@ -7,6 +7,7 @@ import manga from '../../../stores/manga'; import { chapterDatabase } from '$lib/chapterDatabase'; import cacheMangaMinutes from '../../../stores/cacheMangaMinutes'; + import roundDownChapters from '../../../stores/roundDownChapters'; export let user: AniListAuthorisation; export let identity: UserIdentity; @@ -34,7 +35,6 @@ Number($cacheMangaMinutes) ) { const unresolved = await chapterDatabase.chapters.where('chapters').equals(-1).toArray(); - const ids = unresolved.map((m) => m.id); chaptersLastPrune.set(new Date().getTime().toString()); @@ -77,7 +77,8 @@ }) === index && (item.episodes === null && displayUnresolved ? true - : (item.mediaListEntry?.progress || 0) < item.episodes) + : (item.mediaListEntry?.progress || 0) < + ($roundDownChapters === 'true' ? Math.floor(item.episodes) : item.episodes)) ); }); endTime = performance.now() - startTime; |