From cc331b59be0da7e8174ff2c420cd8d51e51ee419 Mon Sep 17 00:00:00 2001
From: Fuwn <contact@fuwn.me>
Date: Sun, 1 Oct 2023 02:14:57 -0700
Subject: feat(list): colour last updated media if remains

---
 src/lib/List/Template/MangaListTemplate.svelte | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

(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 c6d02bf8..52900bd4 100644
--- a/src/lib/List/Template/MangaListTemplate.svelte
+++ b/src/lib/List/Template/MangaListTemplate.svelte
@@ -18,6 +18,7 @@
 	let mangaLists: Promise<Media[]>;
 	let startTime: number;
 	let endTime: number;
+	let lastUpdatedMedia = -1;
 
 	const keyCacher = setInterval(() => {
 		startTime = performance.now();
@@ -112,6 +113,7 @@
 				$lastPruneTimes.manga,
 				true
 			);
+			lastUpdatedMedia = id;
 		});
 	};
 
@@ -155,7 +157,13 @@
 			{#each cleanedMedia as manga}
 				<li>
 					<a href={`https://anilist.co/manga/${manga.id}`} target="_blank">
-						{manga.title.english || manga.title.romaji || manga.title.native}
+						{#if lastUpdatedMedia === manga.id}
+							<span style="color: lightcoral">
+								{manga.title.english || manga.title.romaji || manga.title.native}
+							</span>
+						{:else}
+							{manga.title.english || manga.title.romaji || manga.title.native}
+						{/if}
 					</a>
 					<span style="opacity: 50%;">|</span>
 					{(manga.mediaListEntry || { progress: 0 }).progress}
-- 
cgit v1.2.3

