diff options
| author | Fuwn <[email protected]> | 2026-05-25 08:41:20 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2026-05-25 08:41:20 +0000 |
| commit | bb7085f697e7ee61fb41a669dd87ce71b1b704b2 (patch) | |
| tree | e38535cd14bf46cfca894e30d08534a018482025 /src/lib/List/Anime | |
| parent | fix(locale): deep-merge fallback into partial namespace returns (diff) | |
| download | due.moe-bb7085f697e7ee61fb41a669dd87ce71b1b704b2.tar.xz due.moe-bb7085f697e7ee61fb41a669dd87ce71b1b704b2.zip | |
The optimistic local bump mutated anime.mediaListEntry.progress before
the API call read it, so the GraphQL mutation's own +1 landed on the
already-incremented value and advanced progress by two.
Diffstat (limited to 'src/lib/List/Anime')
| -rw-r--r-- | src/lib/List/Anime/CleanAnimeList.svelte | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/lib/List/Anime/CleanAnimeList.svelte b/src/lib/List/Anime/CleanAnimeList.svelte index 5cb6cb1e..e27378eb 100644 --- a/src/lib/List/Anime/CleanAnimeList.svelte +++ b/src/lib/List/Anime/CleanAnimeList.svelte @@ -225,16 +225,11 @@ const increment = (anime: Media, progress: number) => { ? media.filter((m) => m.id !== anime.id) : media; - incrementMediaProgress( - anime.id, - anime.mediaListEntry?.progress, - user, - (skipped) => { - pendingUpdate = null; - - if (!skipped) $revalidateAnime = $revalidateAnime + 1; - }, - ); + incrementMediaProgress(anime.id, progress, user, (skipped) => { + pendingUpdate = null; + + if (!skipped) $revalidateAnime = $revalidateAnime + 1; + }); }; </script> |