aboutsummaryrefslogtreecommitdiff
path: root/src/lib/List/UpcomingAnimeList.svelte
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/List/UpcomingAnimeList.svelte')
-rw-r--r--src/lib/List/UpcomingAnimeList.svelte20
1 files changed, 7 insertions, 13 deletions
diff --git a/src/lib/List/UpcomingAnimeList.svelte b/src/lib/List/UpcomingAnimeList.svelte
index 7cac01fc..bb52b573 100644
--- a/src/lib/List/UpcomingAnimeList.svelte
+++ b/src/lib/List/UpcomingAnimeList.svelte
@@ -7,7 +7,7 @@
import anime from '../../stores/anime';
import lastPruneTimes from '../../stores/lastPruneTimes';
import settings from '../../stores/settings';
- import { airingTime } from '$lib/anime';
+ import { airingTime, cleanCache } from '$lib/anime';
export let user: AniListAuthorisation;
export let identity: UserIdentity;
@@ -72,17 +72,6 @@
return finalMedia;
};
-
- const cleanCache = () => {
- animeLists = mediaListCollection(
- user,
- identity,
- Type.Anime,
- $anime,
- $lastPruneTimes.anime,
- true
- );
- };
</script>
{#await animeLists}
@@ -99,7 +88,12 @@
{#if cleanedMedia.length === 0}
<ul>
- <li>No anime to display. <a href={'#'} on:click={cleanCache}>Force refresh</a></li>
+ <li>
+ No anime to display. <a
+ href={'#'}
+ on:click={() => (animeLists = cleanCache(user, identity))}>Force refresh</a
+ >
+ </li>
</ul>
{/if}