fix tests

This commit is contained in:
Salvatore Giordano
2020-11-10 16:46:25 +01:00
parent 1ef232c2a9
commit 3cfe5efd09
2 changed files with 28 additions and 6 deletions
+14 -5
View File
@@ -70,11 +70,20 @@ class ChannelPreview extends StatelessWidget {
StreamChatTheme.of(context).channelPreviewTheme.title,
),
),
if (channel.state.members.contains(
(Member e) => e.userId == channel.client.state.user.id))
UnreadIndicator(
channel: channel,
),
StreamBuilder<List<Member>>(
stream: channel.state.membersStream,
initialData: channel.state.members,
builder: (context, snapshot) {
if (!snapshot.hasData ||
snapshot.data.isEmpty ||
!snapshot.data.any((Member e) =>
e.user.id == channel.client.state.user.id)) {
return SizedBox();
}
return UnreadIndicator(
channel: channel,
);
}),
],
),
subtitle: Row(