From b31ac5a306a2766a8688b340bc0917bd82ac8137 Mon Sep 17 00:00:00 2001
From: Fuwn <contact@fuwn.me>
Date: Fri, 1 Sep 2023 16:22:24 -0700
Subject: fix(due): increment first

---
 src/lib/List/Due/AnimeList.svelte | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

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

diff --git a/src/lib/List/Due/AnimeList.svelte b/src/lib/List/Due/AnimeList.svelte
index 2e5ca47f..17897d8d 100644
--- a/src/lib/List/Due/AnimeList.svelte
+++ b/src/lib/List/Due/AnimeList.svelte
@@ -123,9 +123,9 @@
 	};
 
 	const updateMedia = async (id: number, progress: number | undefined) => {
-		animeLists = mediaListCollection(user, identity, Type.Anime, $anime, $animeLastPrune, true);
-
-		await fetch(`/anilist/increment?id=${id}&progress=${(progress || 0) + 1}`);
+		fetch(`/anilist/increment?id=${id}&progress=${(progress || 0) + 1}`).then(() => {
+			animeLists = mediaListCollection(user, identity, Type.Anime, $anime, $animeLastPrune, true);
+		});
 	};
 </script>
 
-- 
cgit v1.2.3

