diff options
| author | Fuwn <[email protected]> | 2026-06-04 09:28:32 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2026-06-04 09:28:32 +0000 |
| commit | f34de9760850489d8f08eddb9bd33a41beda4771 (patch) | |
| tree | 949f6b91e65980d0c2ff28141120d42261ad1696 /src/lib/List/Anime/AnimeListTemplate.svelte | |
| parent | fix(security): allow vercel.live and loosen font-src in CSP (diff) | |
| download | due.moe-f34de9760850489d8f08eddb9bd33a41beda4771.tar.xz due.moe-f34de9760850489d8f08eddb9bd33a41beda4771.zip | |
On revalidation the {#await} branch swaps and remounts CleanAnimeList,
resetting NumberTicker's tween to 0 so it always counted up. Persist the
last displayed count in AnimeListTemplate (which survives the remount) and
feed it as the ticker's start, so the count animates in the real
direction: down when an item leaves due/upcoming, up when one arrives.
Diffstat (limited to 'src/lib/List/Anime/AnimeListTemplate.svelte')
| -rw-r--r-- | src/lib/List/Anime/AnimeListTemplate.svelte | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/List/Anime/AnimeListTemplate.svelte b/src/lib/List/Anime/AnimeListTemplate.svelte index ae7ee1f1..5d769640 100644 --- a/src/lib/List/Anime/AnimeListTemplate.svelte +++ b/src/lib/List/Anime/AnimeListTemplate.svelte @@ -34,6 +34,7 @@ export let limit: number | undefined = undefined; let lastUpdatedMedia = -1; let previousAnimeList: Media[]; +let previousCount: number | undefined; let pendingUpdate: number | null = null; let lastListSize = 8; @@ -74,6 +75,7 @@ onMount(async () => { {notYetReleased} {upcoming} bind:previousAnimeList + bind:previousCount bind:pendingUpdate {dummy} {disableFilter} @@ -97,6 +99,7 @@ onMount(async () => { {notYetReleased} {upcoming} bind:previousAnimeList + bind:previousCount bind:pendingUpdate {dummy} {disableFilter} |