From 3b10a1f47fd5838fe3b94c19673a52610b88cf1e Mon Sep 17 00:00:00 2001
From: Fuwn <contact@fuwn.net>
Date: Sun, 1 Mar 2026 14:20:08 -0800
Subject: perf: optimise list hot paths and shared timers

---
 src/lib/List/CleanGrid.svelte | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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

diff --git a/src/lib/List/CleanGrid.svelte b/src/lib/List/CleanGrid.svelte
index 1e6f5a12..4f628c3c 100644
--- a/src/lib/List/CleanGrid.svelte
+++ b/src/lib/List/CleanGrid.svelte
@@ -17,7 +17,7 @@
 
   let uniqueID = new Date().getTime();
 
-  $: sortedMedia = reverseSort ? media.reverse() : media;
+  $: sortedMedia = reverseSort ? [...media].reverse() : media;
   $: processedMedia = limit !== undefined ? sortedMedia.slice(0, limit) : sortedMedia;
 </script>
 
@@ -25,7 +25,7 @@
   class="covers"
   style={`grid-template-columns: repeat(auto-fill, minmax(${$settings.displayCoverWidth}px, 1fr))`}
 >
-  {#each processedMedia as title, index}
+  {#each processedMedia as title, index (title.id)}
     {@const progress = (title.mediaListEntry || { progress: 0 }).progress}
     {@const isAboveFold = index < 6}
 
-- 
cgit v1.2.3

