From 0bbed0a6df47e3308d1c1462ad7281a48e4d8248 Mon Sep 17 00:00:00 2001
From: Fuwn <contact@fuwn.me>
Date: Mon, 6 Nov 2023 18:22:26 -0800
Subject: fix(manga): wait for prune on clean

---
 src/lib/List/Template/MangaListTemplate.svelte | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

(limited to 'src/lib/List/Template/MangaListTemplate.svelte')

diff --git a/src/lib/List/Template/MangaListTemplate.svelte b/src/lib/List/Template/MangaListTemplate.svelte
index 9b20357c..5dbd94d0 100644
--- a/src/lib/List/Template/MangaListTemplate.svelte
+++ b/src/lib/List/Template/MangaListTemplate.svelte
@@ -130,20 +130,20 @@
 		});
 	};
 
-	const cleanCache = async () => {
+	const cleanCache = () => {
 		startTime = performance.now();
 		endTime = -1;
 
-		await pruneAllManga();
-
-		mangaLists = mediaListCollection(
-			user,
-			identity,
-			Type.Manga,
-			$manga,
-			$lastPruneTimes.manga,
-			true
-		);
+		pruneAllManga().then(() => {
+			mangaLists = mediaListCollection(
+				user,
+				identity,
+				Type.Manga,
+				$manga,
+				$lastPruneTimes.manga,
+				true
+			);
+		});
 	};
 </script>
 
-- 
cgit v1.2.3

