We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 84f7292 commit 18c66b1Copy full SHA for 18c66b1
src/web/Client/Features/Chat/LargeChatComponent.razor
@@ -154,8 +154,11 @@
154
// We call this twice to ensure we're at the very bottom. Silly but easy
155
await ScrollToBottom();
156
157
- await ChatService.MarkMessagesAsRead(_activeChat.Id);
158
- _unreadMessages?.Remove(_activeChat.Id);
+ if (_unreadMessages?.TryGetValue(_activeChat.Id, out _) is true)
+ {
159
+ await ChatService.MarkMessagesAsRead(_activeChat.Id);
160
+ _unreadMessages.Remove(_activeChat.Id);
161
+ }
162
}
163
164
0 commit comments