aboutsummaryrefslogtreecommitdiff
path: root/src/lib/List/Manga/MangaListTemplate.svelte
diff options
context:
space:
mode:
authorFuwn <[email protected]>2025-06-12 22:06:31 -0700
committerFuwn <[email protected]>2025-06-12 22:06:31 -0700
commite8612618fb20f779ebe2e85edf32d71961d2f1d4 (patch)
treefa8565afb8584bbf55f4f4d496c2c350a5a25210 /src/lib/List/Manga/MangaListTemplate.svelte
parentrefactor(List): Simplify get-set structure of stateBin usage (diff)
downloaddue.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.svelte5
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);
}