diff --git a/materialious/src/lib/api/backend/history.ts b/materialious/src/lib/api/backend/history.ts index 90e4eca7..f2d5f680 100644 --- a/materialious/src/lib/api/backend/history.ts +++ b/materialious/src/lib/api/backend/history.ts @@ -2,6 +2,8 @@ import sodium from 'libsodium-wrappers-sumo'; import { decryptWithMasterKey, encryptWithMasterKey, getRawKey, getSecureHash } from './encryption'; import type { VideoPlay, VideoWatchHistory } from '../model'; import { getBestThumbnail } from '$lib/images'; +import { get } from 'svelte/store'; +import { watchHistoryEnabledStore } from '$lib/store'; export async function updateWatchHistory(videoId: string, progress: number) { await sodium.ready; @@ -115,6 +117,8 @@ export async function deleteWatchHistory() { } export async function saveWatchHistory(video: VideoPlay, progress: number = 0) { + if (!get(watchHistoryEnabledStore)) return; + await sodium.ready; const rawKey = await getRawKey(); if (!rawKey) return; diff --git a/materialious/src/lib/components/settings/InternalAccount.svelte b/materialious/src/lib/components/settings/InternalAccount.svelte index d9e28c80..d6180e78 100644 --- a/materialious/src/lib/components/settings/InternalAccount.svelte +++ b/materialious/src/lib/components/settings/InternalAccount.svelte @@ -1,6 +1,7 @@ -
Delete account
+
+ +
+
+
+
+