Timothy J. Baek 10 months ago
parent
commit
1c355929fc

+ 4 - 1
src/lib/components/layout/Sidebar.svelte

@@ -124,7 +124,7 @@
 
 		const onBlur = () => {
 			shiftKey = false;
-			selectedChatId = false;
+			selectedChatId = null;
 		};
 
 		window.addEventListener('keydown', onKeyDown);
@@ -477,6 +477,9 @@
 						on:select={() => {
 							selectedChatId = chat.id;
 						}}
+						on:unselect={() => {
+							selectedChatId = null;
+						}}
 						on:delete={(e) => {
 							if ((e?.detail ?? '') === 'shift') {
 								deleteChatHandler(chat.id);

+ 1 - 1
src/lib/components/layout/Sidebar/ChatItem.svelte

@@ -231,7 +231,7 @@
 						dispatch('delete');
 					}}
 					onClose={() => {
-						selected = false;
+						dispatch('unselect');
 					}}
 				>
 					<button