Skip to content

Commit

Permalink
fix: unread count not updating while the chat is open
Browse files Browse the repository at this point in the history
  • Loading branch information
imtoori committed Mar 17, 2021
1 parent 64082ec commit 721b30e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/stream_chat_flutter/lib/src/message_list_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,7 @@ class _MessageListViewState extends State<MessageListView> {
Widget messageWidget;
if (widget.messageBuilder != null) {
messageWidget = Builder(
key: ValueKey<String>('BOTTOM-MESSAGE'),
key: ValueKey<String>('BOTTOM-MESSAGE-${message.id}'),
builder: (_) => widget.messageBuilder(
context,
MessageDetails(
Expand All @@ -766,7 +766,7 @@ class _MessageListViewState extends State<MessageListView> {
}

return VisibilityDetector(
key: ValueKey<String>('BOTTOM-MESSAGE'),
key: ValueKey<String>('BOTTOM-MESSAGE-${message.id}'),
onVisibilityChanged: (visibility) {
final isVisible = visibility.visibleBounds != Rect.zero;
if (isVisible) {
Expand Down

0 comments on commit 721b30e

Please sign in to comment.