This commit is contained in:
Timothy J. Baek 2024-09-23 23:52:45 +02:00
parent e06667ead8
commit 8f1b9bdf8a

View File

@ -129,7 +129,7 @@
} else {
return {
...a,
[modelIdx]: 0
[modelIdx]: groupedMessageIds[modelIdx].messageIds.length - 1
};
}
}, {});
@ -149,7 +149,14 @@
};
onMount(async () => {
initHandler();
await initHandler();
await tick();
const messageElement = document.getElementById(`message-${messageId}`);
console.log(messageElement);
if (messageElement) {
messageElement.scrollIntoView({ behavior: 'smooth', block: 'center' });
}
});
</script>