aboutsummaryrefslogtreecommitdiff
path: root/src/stores
diff options
context:
space:
mode:
authorFuwn <[email protected]>2023-08-27 17:27:43 -0700
committerFuwn <[email protected]>2023-08-27 17:27:43 -0700
commit1e0dc85d558b61c14863bf38275b5038bac6abec (patch)
tree45a8fc39a7672f732427e946c09d20fd512726a3 /src/stores
parentfeat: cache media (diff)
downloaddue.moe-1e0dc85d558b61c14863bf38275b5038bac6abec.tar.xz
due.moe-1e0dc85d558b61c14863bf38275b5038bac6abec.zip
fix(manga): pruning
Diffstat (limited to 'src/stores')
-rw-r--r--src/stores/chaptersLastPrune.ts14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/stores/chaptersLastPrune.ts b/src/stores/chaptersLastPrune.ts
new file mode 100644
index 00000000..bccee23e
--- /dev/null
+++ b/src/stores/chaptersLastPrune.ts
@@ -0,0 +1,14 @@
+import { browser } from '$app/environment';
+import { writable } from 'svelte/store';
+
+const chaptersLastPrune = writable<string>(
+ browser ? localStorage.getItem('chaptersLastPrune') ?? '' : ''
+);
+
+chaptersLastPrune.subscribe((value) => {
+ if (browser) {
+ localStorage.setItem('chaptersLastPrune', value);
+ }
+});
+
+export default chaptersLastPrune;