diff options
| author | Fuwn <[email protected]> | 2025-06-12 22:06:31 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2025-06-12 22:06:31 -0700 |
| commit | e8612618fb20f779ebe2e85edf32d71961d2f1d4 (patch) | |
| tree | fa8565afb8584bbf55f4f4d496c2c350a5a25210 /src/lib/List/Manga/MangaListTemplate.svelte | |
| parent | refactor(List): Simplify get-set structure of stateBin usage (diff) | |
| download | due.moe-e8612618fb20f779ebe2e85edf32d71961d2f1d4.tar.xz due.moe-e8612618fb20f779ebe2e85edf32d71961d2f1d4.zip | |
feat: Move remaining localStorage usages to localforage
Diffstat (limited to 'src/lib/List/Manga/MangaListTemplate.svelte')
| -rw-r--r-- | src/lib/List/Manga/MangaListTemplate.svelte | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/List/Manga/MangaListTemplate.svelte b/src/lib/List/Manga/MangaListTemplate.svelte index 0b38158b..d7f00616 100644 --- a/src/lib/List/Manga/MangaListTemplate.svelte +++ b/src/lib/List/Manga/MangaListTemplate.svelte @@ -20,6 +20,7 @@ import { browser } from '$app/environment'; import identity from '$stores/identity'; import privilegedUser from '$lib/Utility/privilegedUser'; + import localforage from 'localforage'; export let user: AniListAuthorisation = { accessToken: '', @@ -57,7 +58,9 @@ onMount(async () => { if (browser) { - const lastStoredList = localStorage.getItem(`last${due ? '' : 'Completed'}MangaListLength`); + const lastStoredList = (await localforage.getItem( + `last${due ? '' : 'Completed'}MangaListLength` + )) as number | null; if (lastStoredList) lastListSize = parseInt(lastStoredList); } |