aboutsummaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorFuwn <[email protected]>2023-08-27 17:40:50 -0700
committerFuwn <[email protected]>2023-08-27 17:40:50 -0700
commit585bc0cb4993323c855cf4112491b5c55bfcd611 (patch)
tree059ecc218841c8e84413871f7ef83b43bcf3fbf0 /src/lib
parentfix(manga): pruning (diff)
downloaddue.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.svelte5
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;