From a1536c848782a08cfb8ca4bae0a61b71ce01e976 Mon Sep 17 00:00:00 2001
From: Fuwn <contact@fuwn.me>
Date: Sun, 27 Aug 2023 17:42:53 -0700
Subject: fix(mang): premature key prune

---
 src/lib/List/Due/MangaList.svelte | 5 +++--
 1 file changed, 3 insertions(+), 2 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 113d4017..549c6008 100644
--- a/src/lib/List/Due/MangaList.svelte
+++ b/src/lib/List/Due/MangaList.svelte
@@ -8,6 +8,7 @@
 	import { chapterDatabase } from '$lib/chapterDatabase';
 	import cacheMangaMinutes from '../../../stores/cacheMangaMinutes';
 	import roundDownChapters from '../../../stores/roundDownChapters';
+	import mangaLastPrune from '../../../stores/mangaLastPrune';
 
 	export let user: AniListAuthorisation;
 	export let identity: UserIdentity;
@@ -19,7 +20,7 @@
 
 	onMount(async () => {
 		startTime = performance.now();
-		mangaLists = mediaListCollection(user, identity, Type.Manga, $manga, $chaptersLastPrune);
+		mangaLists = mediaListCollection(user, identity, Type.Manga, $manga, $mangaLastPrune);
 	});
 
 	const cleanMedia = async (media: object[][], displayUnresolved: boolean) => {
@@ -87,7 +88,7 @@
 	};
 
 	const updateMedia = async (id: number, progress: number | undefined) => {
-		mangaLists = mediaListCollection(user, identity, Type.Manga, $manga, $chaptersLastPrune);
+		mangaLists = mediaListCollection(user, identity, Type.Manga, $manga, $mangaLastPrune);
 
 		await fetch(`/anilist/increment?id=${id}&progress=${progress! + 1}`);
 	};
-- 
cgit v1.2.3

