From 345688bc922d15214a747b74f76860e1ef72d197 Mon Sep 17 00:00:00 2001 From: WardPearce Date: Thu, 28 Mar 2024 23:08:26 +1300 Subject: [PATCH] Wipe localstorage video progress tracking on history clear --- materialious/src/routes/history/+page.svelte | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/materialious/src/routes/history/+page.svelte b/materialious/src/routes/history/+page.svelte index 5ee3e97a..05053768 100644 --- a/materialious/src/routes/history/+page.svelte +++ b/materialious/src/routes/history/+page.svelte @@ -48,6 +48,12 @@ on:click={async () => { await deleteHistory(); history = []; + Object.keys(localStorage).forEach((key) => { + let content = localStorage.getItem(key); + if (content && content.startsWith('v_')) { + localStorage.removeItem(key); + } + }); }} > delete_sweep