fix: initialise unread counts on mount to prevent false unread dots (#164)

This commit is contained in:
2026-02-25 20:24:18 -08:00
committed by Naomi Carrigan
parent dbf5234a42
commit 2b371bf9af
@@ -216,6 +216,14 @@
// Keyboard shortcuts
onMount(() => {
// Initialise all conversations as seen on mount so that remounting
// this component (e.g. after closing the file editor) doesn't falsely
// mark existing messages as unread.
for (const [id, conversation] of $conversations) {
lastSeenMessageCount.set(id, conversation.terminalLines.length);
}
lastSeenMessageCount = lastSeenMessageCount;
function handleGlobalKeydown(event: KeyboardEvent) {
// Ctrl/Cmd + T: New tab
if ((event.ctrlKey || event.metaKey) && event.key === "t") {