From 01f438c3fe36ac23efb153cb4d5baddbd45bdd6f Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Thu, 21 Aug 2025 00:05:37 +0400 Subject: [PATCH] refac --- src/lib/components/chat/Chat.svelte | 2 +- src/lib/components/chat/Navbar.svelte | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/components/chat/Chat.svelte b/src/lib/components/chat/Chat.svelte index e310102db3..a081ecd768 100644 --- a/src/lib/components/chat/Chat.svelte +++ b/src/lib/components/chat/Chat.svelte @@ -745,7 +745,7 @@ if ($settings?.temporaryChatByDefault ?? false) { if ($temporaryChatEnabled === false) { await temporaryChatEnabled.set(true); - } else { + } else if ($temporaryChatEnabled === null) { // if set to null set to false; refer to temp chat toggle click handler await temporaryChatEnabled.set(false); } diff --git a/src/lib/components/chat/Navbar.svelte b/src/lib/components/chat/Navbar.svelte index cb9e460c0c..656bb35ae0 100644 --- a/src/lib/components/chat/Navbar.svelte +++ b/src/lib/components/chat/Navbar.svelte @@ -117,9 +117,9 @@ on:click={async () => { if (($settings?.temporaryChatByDefault ?? false) && $temporaryChatEnabled) { // for proper initNewChat handling - temporaryChatEnabled.set(null); + await temporaryChatEnabled.set(null); } else { - temporaryChatEnabled.set(!$temporaryChatEnabled); + await temporaryChatEnabled.set(!$temporaryChatEnabled); } await goto('/');