From 17542c66ae84011f48f0809e4ff90e06a9471f08 Mon Sep 17 00:00:00 2001 From: Fernando Maclen Date: Fri, 18 Oct 2024 21:16:36 -0400 Subject: [PATCH] fix: session title bug Closes #213 --- src/routes/sessions/[id]/+page.svelte | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/routes/sessions/[id]/+page.svelte b/src/routes/sessions/[id]/+page.svelte index 46519abb..14e2c386 100644 --- a/src/routes/sessions/[id]/+page.svelte +++ b/src/routes/sessions/[id]/+page.svelte @@ -45,7 +45,6 @@ let messagesWindow: HTMLDivElement; let userScrolledUp = false; - $: $editor.isNewSession = !$session?.messages.length; $: if (data.id) handleSessionChange(); onMount(() => { @@ -70,8 +69,9 @@ }); async function handleSessionChange() { - $editor.view = 'messages'; session = writable(loadSession(data.id)); + $editor.view = 'messages'; + $editor.isNewSession = !$session?.messages.length; scrollToBottom(); }