fix(llc,ui): fix user presence indicator update
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
- Fixed `MessageWidget` null errors associated with `channel.memberCount`.
|
||||
- Fixed adding attachments on web.
|
||||
- [[#767]](https://github.com/GetStream/stream-chat-flutter/issues/767): Fix `MessageInput` focus behaviour when sending messages.
|
||||
- Fixed user presence indicator not updating correctly
|
||||
|
||||
## 3.2.0
|
||||
|
||||
|
||||
@@ -59,9 +59,10 @@ class ChannelInfo extends StatelessWidget {
|
||||
final memberCount = channel.memberCount;
|
||||
if (memberCount != null && memberCount > 2) {
|
||||
var text = context.translations.membersCountText(memberCount);
|
||||
final watcherCount = channel.state?.watcherCount ?? 0;
|
||||
if (watcherCount > 0) {
|
||||
text += ' ${context.translations.watchersCountText(watcherCount)}';
|
||||
final onlineCount =
|
||||
members?.where((m) => m.user?.online == true).length ?? 0;
|
||||
if (onlineCount > 0) {
|
||||
text += ', ${context.translations.watchersCountText(onlineCount)}';
|
||||
}
|
||||
alternativeWidget = Text(
|
||||
text,
|
||||
|
||||
@@ -81,6 +81,7 @@ class GroupAvatar extends StatelessWidget {
|
||||
),
|
||||
initialData: member,
|
||||
builder: (context, member) => UserAvatar(
|
||||
showOnlineStatus: false,
|
||||
user: member.user!,
|
||||
borderRadius: BorderRadius.zero,
|
||||
),
|
||||
@@ -118,6 +119,7 @@ class GroupAvatar extends StatelessWidget {
|
||||
),
|
||||
initialData: member,
|
||||
builder: (context, member) => UserAvatar(
|
||||
showOnlineStatus: false,
|
||||
user: member.user!,
|
||||
borderRadius: BorderRadius.zero,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user