From d2b07fe58e3799f024c0301e71a6b80808ca07c6 Mon Sep 17 00:00:00 2001
From: Fuwn <contact@fuwn.me>
Date: Mon, 4 Dec 2023 13:42:59 -0800
Subject: fix(list): fast complete not-due

---
 src/lib/List/Manga/CleanMangaList.svelte | 77 +++++++++++++++++---------------
 1 file changed, 40 insertions(+), 37 deletions(-)

(limited to 'src/lib/List/Manga/CleanMangaList.svelte')

diff --git a/src/lib/List/Manga/CleanMangaList.svelte b/src/lib/List/Manga/CleanMangaList.svelte
index 22ebb154..acea532a 100644
--- a/src/lib/List/Manga/CleanMangaList.svelte
+++ b/src/lib/List/Manga/CleanMangaList.svelte
@@ -14,7 +14,6 @@
 		progress: number | undefined,
 		media: Media[]
 	) => Promise<void>;
-	export let disableIncrement = false;
 	export let pendingUpdate: number | null;
 	export let due: boolean;
 </script>
@@ -33,42 +32,46 @@
 	{#each media as manga}
 		{@const progress = (manga.mediaListEntry || { progress: 0 }).progress}
 
-		<li>
-			<a href={`https://anilist.co/manga/${manga.id}`} target="_blank">
-				<span
-					style={lastUpdatedMedia === manga.id && manga.chapters !== progress
-						? 'color: lightcoral'
-						: ''}
+		{#if progress !== manga.episodes}
+			<li>
+				<a href={`https://anilist.co/manga/${manga.id}`} target="_blank">
+					<span
+						style={lastUpdatedMedia === manga.id && manga.chapters !== progress
+							? 'color: lightcoral'
+							: ''}
+					>
+						<MediaTitle title={manga.title} />
+					</span>
+				</a>
+				{#if $settings.displaySocialButton}
+					[<a href={`https://anilist.co/manga/${manga.id}/social`} target="_blank">S</a>]
+				{/if}
+				<span style="opacity: 50%;">|</span>
+				{pendingUpdate === manga.id ? progress + 1 : progress}{#if !due}
+					<span style="opacity: 50%;">/{manga.chapters || '?'}</span>
+				{/if}
+				<a
+					href={'#'}
+					style={pendingUpdate === manga.id ? 'pointer-events: none; opacity: 50%;' : ''}
+					on:click={() =>
+						pendingUpdate === manga.id
+							? null
+							: updateMedia(manga.id, manga.mediaListEntry?.progress, media)}
 				>
-					<MediaTitle title={manga.title} />
-				</span>
-			</a>
-			{#if $settings.displaySocialButton}
-				[<a href={`https://anilist.co/manga/${manga.id}/social`} target="_blank">S</a>]
-			{/if}
-			<span style="opacity: 50%;">|</span>
-			{pendingUpdate === manga.id ? progress + 1 : progress}{#if !due}
-				<span style="opacity: 50%;">/{manga.chapters || '?'}</span>
-			{/if}
-			<a
-				href={'#'}
-				style={disableIncrement ? 'pointer-events: none; opacity: 50%;' : ''}
-				on:click={() =>
-					disableIncrement ? null : updateMedia(manga.id, manga.mediaListEntry?.progress, media)}
-			>
-				+
-			</a>
-			{#if due || manga.episodes !== manga.chapters}
-				[{manga.episodes || '?'}]
-				{#await volumeCount(manga) then volumes}
-					{@const volumeProgress = manga.mediaListEntry?.progressVolumes}
-					{#if volumes !== null && (volumeProgress || 0) < volumes}
-						<span style="color: lightcoral;">
-							Vol. {volumeProgress} &#8594; {volumes}
-						</span>
-					{/if}
-				{/await}
-			{/if}
-		</li>
+					+
+				</a>
+				{#if due || manga.episodes !== manga.chapters}
+					[{manga.episodes || '?'}]
+					{#await volumeCount(manga) then volumes}
+						{@const volumeProgress = manga.mediaListEntry?.progressVolumes}
+						{#if volumes !== null && (volumeProgress || 0) < volumes}
+							<span style="color: lightcoral;">
+								Vol. {volumeProgress} &#8594; {volumes}
+							</span>
+						{/if}
+					{/await}
+				{/if}
+			</li>
+		{/if}
 	{/each}
 </ul>
-- 
cgit v1.2.3

