Merge branch 'develop' into hotfix/readIndicator

This commit is contained in:
Salvatore Giordano
2021-11-24 15:12:03 +01:00
committed by GitHub
8 changed files with 50 additions and 9 deletions
@@ -13,6 +13,7 @@
- Fixed adding attachments on web.
- [[#767]](https://github.com/GetStream/stream-chat-flutter/issues/767): Fix `MessageInput` focus behaviour when sending messages.
- Fixed read indicator not updating correctly in specific situations.
- 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,
),
@@ -323,6 +323,8 @@ class MessageInput extends StatefulWidget {
/// Defaults to false.
final bool mentionAllAppUsers;
/// Defines if the [MessageInput] loses focuses after a message is sent.
/// The default behaviour keeps focus until a command is enabled.
final bool? shouldKeepFocusAfterMessage;
@override