fix(llc,ui): fix user presence indicator update

This commit is contained in:
Salvatore Giordano
2021-11-23 16:15:48 +01:00
parent 63fb8105d3
commit a0fac0b17b
5 changed files with 20 additions and 4 deletions
+1
View File
@@ -8,6 +8,7 @@
- `closeConnection()` now uses `normalClosure` status when closing websocket.
- Fixed local unread count indicator increasing for thread replies
- Fixed user presence indicator not updating correctly
## 3.2.0
@@ -179,5 +179,16 @@ class User extends Equatable {
);
@override
List<Object?> get props => [id, role];
List<Object?> get props => [
id,
role,
createdAt,
updatedAt,
lastActive,
online,
extraData,
banned,
teams,
language,
];
}
@@ -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,
),