From ddc18557b5de23fee2e0723b305fd8d8de62bd17 Mon Sep 17 00:00:00 2001
From: Fuwn <contact@fuwn.me>
Date: Sun, 3 Sep 2023 18:25:03 -0700
Subject: feat(settings): move cache minutes to settings

---
 src/lib/List/Due/MangaList.svelte | 6 ++----
 1 file changed, 2 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 43976e0d..374d06e1 100644
--- a/src/lib/List/Due/MangaList.svelte
+++ b/src/lib/List/Due/MangaList.svelte
@@ -6,9 +6,7 @@
 	import chaptersLastPrune from '../../../stores/chaptersLastPrune';
 	import manga from '../../../stores/manga';
 	import { chapterDatabase } from '$lib/chapterDatabase';
-	import cacheMangaMinutes from '../../../stores/cacheMangaMinutes';
 	import mangaLastPrune from '../../../stores/mangaLastPrune';
-	import cacheMinutes from '../../../stores/cacheMinutes';
 	import settings from '../../../stores/settings';
 
 	export let user: AniListAuthorisation;
@@ -23,7 +21,7 @@
 		startTime = performance.now();
 		endTime = -1;
 		mangaLists = mediaListCollection(user, identity, Type.Manga, $manga, $mangaLastPrune);
-	}, Number($cacheMinutes || 30) * 1000 * 60);
+	}, Number($settings.cacheMinutes || 30) * 1000 * 60);
 
 	onMount(async () => {
 		startTime = performance.now();
@@ -47,7 +45,7 @@
 		} else {
 			if (
 				(new Date().getTime() - Number($chaptersLastPrune)) / 1000 / 60 >
-				Number($cacheMangaMinutes)
+				Number($settings.cacheMangaMinutes)
 			) {
 				const unresolved = await chapterDatabase.chapters.where('chapters').equals(-1).toArray();
 				const ids = unresolved.map((m) => m.id);
-- 
cgit v1.2.3

