Timothy Jaeryang Baek 1 ماه پیش
والد
کامیت
01f438c3fe
2فایلهای تغییر یافته به همراه3 افزوده شده و 3 حذف شده
  1. 1 1
      src/lib/components/chat/Chat.svelte
  2. 2 2
      src/lib/components/chat/Navbar.svelte

+ 1 - 1
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);
 			}

+ 2 - 2
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('/');