aboutsummaryrefslogtreecommitdiff
path: root/src/lib/Settings
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/Settings')
-rw-r--r--src/lib/Settings/Categories/Debug.svelte16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/lib/Settings/Categories/Debug.svelte b/src/lib/Settings/Categories/Debug.svelte
index c6b16086..ad388fee 100644
--- a/src/lib/Settings/Categories/Debug.svelte
+++ b/src/lib/Settings/Categories/Debug.svelte
@@ -7,19 +7,7 @@ import { options } from "$lib/Notification/options";
import locale from "$stores/locale";
import SettingCheckboxToggle from "../SettingCheckboxToggle.svelte";
import localforage from "localforage";
-import { browser } from "$app/environment";
-
-const clearCaches = async () => {
- if (!browser) return;
-
- await localforage.removeItem("anime");
- await localforage.removeItem("manga");
- addNotification(
- options({
- heading: "Anime and manga list caches successfully cleared",
- }),
- );
-};
+import { invalidateListCaches } from "$lib/Media/invalidate";
</script>
<SettingCheckboxToggle setting="debugDummyLists" text={$locale().debug.dummyLists} />
@@ -29,7 +17,7 @@ const clearCaches = async () => {
/>
<br />
-<button onclick={clearCaches}>{$locale().debug.clearCaches}</button>
+<button onclick={invalidateListCaches}>{$locale().debug.clearCaches}</button>
<Spacer />