aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFuwn <[email protected]>2023-09-19 16:04:25 -0700
committerFuwn <[email protected]>2023-09-19 16:04:25 -0700
commitfef3d89d68f47204b9ae4bd5b61d941a2e069db0 (patch)
tree2ae3fd6ae487c3d48cf058f21598f81d715d5555 /src
parentfix(due): move start time to processing (diff)
downloaddue.moe-fef3d89d68f47204b9ae4bd5b61d941a2e069db0.tar.xz
due.moe-fef3d89d68f47204b9ae4bd5b61d941a2e069db0.zip
feat(manga): single date construct
Diffstat (limited to 'src')
-rw-r--r--src/lib/List/Due/MangaList.svelte6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/List/Due/MangaList.svelte b/src/lib/List/Due/MangaList.svelte
index cf7f1017..dce467aa 100644
--- a/src/lib/List/Due/MangaList.svelte
+++ b/src/lib/List/Due/MangaList.svelte
@@ -40,14 +40,16 @@
if ($lastPruneTimes.chapters === 1) {
lastPruneTimes.setKey('chapters', new Date().getTime());
} else {
+ const currentDate = new Date();
+
if (
- (new Date().getTime() - $lastPruneTimes.chapters) / 1000 / 60 >
+ (currentDate.getTime() - $lastPruneTimes.chapters) / 1000 / 60 >
$settings.cacheMangaMinutes
) {
const unresolved = await chapterDatabase.chapters.where('chapters').equals(-1).toArray();
const ids = unresolved.map((m) => m.id);
- lastPruneTimes.setKey('chapters', new Date().getTime());
+ lastPruneTimes.setKey('chapters', currentDate.getTime());
await chapterDatabase.chapters.bulkDelete(ids);
}
}