diff options
Diffstat (limited to 'src/lib/List/Anime/UpcomingAnimeList.svelte')
| -rw-r--r-- | src/lib/List/Anime/UpcomingAnimeList.svelte | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/src/lib/List/Anime/UpcomingAnimeList.svelte b/src/lib/List/Anime/UpcomingAnimeList.svelte index d9b91122..ed47f22f 100644 --- a/src/lib/List/Anime/UpcomingAnimeList.svelte +++ b/src/lib/List/Anime/UpcomingAnimeList.svelte @@ -96,22 +96,26 @@ const cleanMedia = ( return upcomingAnime; }; -$: { - if ($revalidateAnime) { - $revalidateAnime = false; - $lastPruneTimes.anime = -1; - animeLists = mediaListCollection( - user, - $identity, - Type.Anime, - $anime, - $lastPruneTimes.anime, - { - addNotification, - notificationType: "Upcoming Episodes", - }, - ); - } +let lastAnimeRevalidation = 0; + +$: if ($revalidateAnime > lastAnimeRevalidation) { + lastAnimeRevalidation = $revalidateAnime; + + startTime = performance.now(); + endTime = -1; + + animeLists = mediaListCollection( + user, + $identity, + Type.Anime, + $anime, + $lastPruneTimes.anime, + { + forcePrune: true, + addNotification, + notificationType: "Upcoming Episodes", + }, + ); } </script> |