diff options
| author | Fuwn <[email protected]> | 2023-08-27 17:22:40 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2023-08-27 17:22:40 -0700 |
| commit | 7fc05993446392f5342815734a7a2e99cf63bddb (patch) | |
| tree | fb14a5ab35b6e4fdbcfb83ec18ad3ca594269134 /src/lib/List/Due/AnimeList.svelte | |
| parent | feat(layout): cache user identity (diff) | |
| download | due.moe-7fc05993446392f5342815734a7a2e99cf63bddb.tar.xz due.moe-7fc05993446392f5342815734a7a2e99cf63bddb.zip | |
feat: cache media
Diffstat (limited to 'src/lib/List/Due/AnimeList.svelte')
| -rw-r--r-- | src/lib/List/Due/AnimeList.svelte | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/List/Due/AnimeList.svelte b/src/lib/List/Due/AnimeList.svelte index 4580cdf1..8527ed43 100644 --- a/src/lib/List/Due/AnimeList.svelte +++ b/src/lib/List/Due/AnimeList.svelte @@ -2,6 +2,8 @@ import { mediaListCollection, Type, flattenLists, type Media } from '$lib/AniList/media'; import type { UserIdentity, AniListAuthorisation } from '$lib/AniList/identity'; import { onMount } from 'svelte'; + import anime from '../../../stores/anime'; + import animeLastPrune from '../../../stores/mangaLastPrune'; export let user: AniListAuthorisation; export let identity: UserIdentity; @@ -13,7 +15,7 @@ onMount(async () => { startTime = performance.now(); - animeLists = mediaListCollection(user, identity, Type.Anime); + animeLists = mediaListCollection(user, identity, Type.Anime, $anime, $animeLastPrune); }); const cleanMedia = (media: object[][], displayUnresolved: boolean) => { @@ -104,7 +106,7 @@ }; const updateMedia = async (id: number, progress: number | undefined) => { - animeLists = mediaListCollection(user, identity, Type.Anime); + animeLists = mediaListCollection(user, identity, Type.Anime, $anime, $animeLastPrune); await fetch(`/anilist/increment?id=${id}&progress=${progress! + 1}`); }; |