Skip to content

Commit 56b9b68

Browse files
committed
Added a note about excluding the current user's messages from the unread count
1 parent 49b6eab commit 56b9b68

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

app/ts/components/ChatNavBar.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ export class ChatNavBar implements OnInit {
4545
let messageIsInCurrentThread: boolean = m.thread &&
4646
currentThread &&
4747
(currentThread.id === m.thread.id);
48+
// note: in a "real" app you should also exclude
49+
// messages that were authored by the current user b/c they've
50+
// already been "read"
4851
if (m && !m.isRead && !messageIsInCurrentThread) {
4952
sum = sum + 1;
5053
}

0 commit comments

Comments
 (0)