From 6013449b7dc4a67c51fe9ca09760c22f80a582c0 Mon Sep 17 00:00:00 2001
From: Fuwn <contact@fuwn.net>
Date: Fri, 29 May 2026 14:33:53 +0000
Subject: feat(lists): animate list-title count with NumberTicker

---
 src/lib/List/ListTitle.svelte | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

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

diff --git a/src/lib/List/ListTitle.svelte b/src/lib/List/ListTitle.svelte
index 2e9181d0..e9603066 100644
--- a/src/lib/List/ListTitle.svelte
+++ b/src/lib/List/ListTitle.svelte
@@ -1,6 +1,7 @@
 <script lang="ts">
 import tooltip from "$lib/Tooltip/tooltip";
 import settings from "$stores/settings";
+import NumberTicker from "$lib/Layout/NumberTicker.svelte";
 import type { Title } from "./mediaTitle";
 
 export let time: number | undefined = undefined;
@@ -17,12 +18,13 @@ export let hideCount = false;
 <summary>
   <span class="list-title-text" title={title.hint || undefined} use:tooltip>{title.title}</span>
   {#if !hideCount}
-    <span class="opaque list-title-count">{count === -1337 ? '...' : count}</span>
+    <span class="opaque list-title-count">
+      {#if count === -1337}...{:else}<NumberTicker
+          end={count}
+          duration={Math.min(2500, Math.max(500, Math.abs(count) * 10))}
+        />{/if}
+    </span>
   {/if}
-  <!-- {#if !hideCount}{#if count === -1337}...{:else}<NumberTicker
-				end={count}
-				duration={Math.min(2500, Math.max(500, Math.abs(count - 0) * 10))}
-			/>{/if}{/if} -->
   {#if !hideTime && $settings.debugShowListTimings}
     {#if !hideCount}
       <span class="opaque list-title-separator">·</span>
-- 
cgit v1.2.3

