Skip to content

Commit 87ddaab

Browse files
committed
clarify announcing
1 parent f7cbce3 commit 87ddaab

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

src/app/components/GlobalKeyboardShortcuts.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,11 @@ export function GlobalKeyboardShortcuts() {
8989
}
9090
const roomName = mx.getRoom(roomId)?.name ?? 'Room';
9191
const roomType = isDirect ? 'Direct Message' : 'Group Room';
92-
announce(
93-
`${roomName}, ${roomType}.${remaining && `${remaining} room${remaining === 1 ? '' : 's'} unread.`}`
94-
);
92+
if (remaining)
93+
announce(
94+
`${roomName}, ${roomType}. ${remaining} room${remaining === 1 ? '' : 's'} unread.`
95+
);
96+
else announce(`${roomName}, ${roomType}`);
9597
},
9698
[mx, mDirects, roomToParents, navigate]
9799
);

0 commit comments

Comments
 (0)