show unread indicator only for members
This commit is contained in:
@@ -70,9 +70,11 @@ class ChannelPreview extends StatelessWidget {
|
||||
StreamChatTheme.of(context).channelPreviewTheme.title,
|
||||
),
|
||||
),
|
||||
UnreadIndicator(
|
||||
channel: channel,
|
||||
),
|
||||
if (channel.state.members.contains(
|
||||
(Member e) => e.userId == channel.client.state.user.id))
|
||||
UnreadIndicator(
|
||||
channel: channel,
|
||||
),
|
||||
],
|
||||
),
|
||||
subtitle: Row(
|
||||
@@ -92,7 +94,7 @@ class ChannelPreview extends StatelessWidget {
|
||||
.isAfter(channel
|
||||
.state.lastMessage.createdAt))
|
||||
.length ==
|
||||
channel.memberCount - 1,
|
||||
(channel.memberCount ?? 0) - 1,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user