From 95e6b94d38855dd3e6f7d7e5ba7d85b281360f60 Mon Sep 17 00:00:00 2001
From: Fuwn <contact@fuwn.me>
Date: Fri, 8 Sep 2023 00:22:51 -0700
Subject: fix(watching): sort

---
 src/lib/List/WatchingAnimeList.svelte | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

(limited to 'src/lib/List/WatchingAnimeList.svelte')

diff --git a/src/lib/List/WatchingAnimeList.svelte b/src/lib/List/WatchingAnimeList.svelte
index c1922cef..f398d78f 100644
--- a/src/lib/List/WatchingAnimeList.svelte
+++ b/src/lib/List/WatchingAnimeList.svelte
@@ -38,12 +38,7 @@
 
 		finalMedia.sort((a: Media, b: Media) => {
 			const difference = (anime: Media) => {
-				return (
-					(anime.nextAiringEpisode?.episode === -1
-						? 99999
-						: anime.nextAiringEpisode?.episode || -1) -
-					(anime.mediaListEntry || { progress: 0 }).progress
-				);
+				return anime.episodes - (anime.mediaListEntry || { progress: 0 }).progress;
 			};
 
 			return difference(a) - difference(b);
-- 
cgit v1.2.3

