Timothy J. Baek 7 kuukautta sitten
vanhempi
commit
5a168ecc2a
1 muutettua tiedostoa jossa 4 lisäystä ja 1 poistoa
  1. 4 1
      src/lib/components/chat/Overview.svelte

+ 4 - 1
src/lib/components/chat/Overview.svelte

@@ -38,13 +38,16 @@
 
 
 	$: if (history && history.currentId) {
 	$: if (history && history.currentId) {
 		focusNode();
 		focusNode();
-		selectedMessageId = null;
 	}
 	}
 
 
 	const focusNode = async () => {
 	const focusNode = async () => {
 		if (selectedMessageId === null) {
 		if (selectedMessageId === null) {
 			await fitView({ nodes: [{ id: history.currentId }] });
 			await fitView({ nodes: [{ id: history.currentId }] });
+		} else {
+			await fitView({ nodes: [{ id: selectedMessageId }] });
 		}
 		}
+
+		selectedMessageId = null;
 	};
 	};
 
 
 	const drawFlow = async () => {
 	const drawFlow = async () => {