diff --git a/frontend/src/components/Home.svelte b/frontend/src/components/Home.svelte index afcf990..db20e2c 100644 --- a/frontend/src/components/Home.svelte +++ b/frontend/src/components/Home.svelte @@ -52,12 +52,19 @@ } // Re-fetch from the server when the toggles flip — the WHERE clause is - // server-side so we can't filter the existing array client-side. - $effect(() => { - void showArchived; - void showHidden; - if (!loading) load(); - }); + // server-side so we can't filter the existing array client-side. Triggered + // from the checkbox onchange handlers below, NOT from a $effect — the + // effect form had a self-fire loop (each load() toggles `loading`, the + // effect tracked `loading`, every cycle re-triggered itself, list stayed + // stuck on "Laster …"). + function onToggleArchive(e: Event) { + showArchived = (e.currentTarget as HTMLInputElement).checked; + load(); + } + function onToggleHidden(e: Event) { + showHidden = (e.currentTarget as HTMLInputElement).checked; + load(); + } function onCreated(a: Activity) { activities = [a, ...activities]; @@ -234,11 +241,11 @@ {#if !publicOnly && session.user}