generated from nhcarrigan/template
fix: initialise unread counts on mount to prevent false unread dots (#164)
This commit is contained in:
@@ -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") {
|
||||
|
||||
Reference in New Issue
Block a user