From 530ff1b91f3588eb870259f50bc114fbbac3b8d0 Mon Sep 17 00:00:00 2001
From: Fuwn <contact@fuwn.me>
Date: Sun, 3 Sep 2023 18:40:25 -0700
Subject: fix: remove useless casts

---
 src/lib/List/Due/MangaList.svelte | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

(limited to 'src/lib/List/Due/MangaList.svelte')

diff --git a/src/lib/List/Due/MangaList.svelte b/src/lib/List/Due/MangaList.svelte
index 353d1895..90b2f497 100644
--- a/src/lib/List/Due/MangaList.svelte
+++ b/src/lib/List/Due/MangaList.svelte
@@ -20,7 +20,7 @@
 		startTime = performance.now();
 		endTime = -1;
 		mangaLists = mediaListCollection(user, identity, Type.Manga, $manga, $lastPruneTimes.manga);
-	}, Number($settings.cacheMinutes || 30) * 1000 * 60);
+	}, $settings.cacheMinutes * 1000 * 60);
 
 	onMount(async () => {
 		startTime = performance.now();
@@ -40,16 +40,16 @@
 		}
 
 		if ($lastPruneTimes.chapters === 1) {
-			lastPruneTimes.setKey('chapters', new Date().getTime().toString());
+			lastPruneTimes.setKey('chapters', new Date().getTime());
 		} else {
 			if (
 				(new Date().getTime() - $lastPruneTimes.chapters) / 1000 / 60 >
-				Number($settings.cacheMangaMinutes)
+				$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().toString());
+				lastPruneTimes.setKey('chapters', new Date().getTime());
 				await chapterDatabase.chapters.bulkDelete(ids);
 			}
 		}
-- 
cgit v1.2.3

