Merge branch 'develop' into fix/image-attachment-web

This commit is contained in:
Gordon
2022-12-02 17:51:48 +01:00
committed by GitHub
10 changed files with 32 additions and 29 deletions
@@ -2,6 +2,7 @@
🐞 Fixed
- [[#1379]](https://github.com/GetStream/stream-chat-flutter/issues/1379) Fixed "Issues with photo attachments on web", where the cached image attachment would not render while uploading.
- Fix render overflow issue with `MessageSearchListTileTitle`. It now uses `Text.rich` instead of `Row`. Better default behaviour and allows `TextOverflow`.
## 5.1.0
@@ -122,7 +122,8 @@ class StreamMessageSearchListTile extends StatelessWidget {
final title = this.title ??
MessageSearchListTileTitle(
messageResponse: messageResponse,
textStyle: channelPreviewTheme.titleStyle,
textStyle: channelPreviewTheme.titleStyle
?.copyWith(overflow: TextOverflow.ellipsis),
);
final subtitle = this.subtitle ??
@@ -177,27 +178,28 @@ class MessageSearchListTileTitle extends StatelessWidget {
final channel = messageResponse.channel;
final channelName = channel?.extraData['name'];
return Row(
children: [
Text(
user.id == StreamChat.of(context).currentUser?.id
? context.translations.youText
: user.name,
style: textStyle,
),
if (channelName != null) ...[
Text(
' ${context.translations.inText} ',
style: textStyle?.copyWith(
fontWeight: FontWeight.normal,
return Text.rich(
TextSpan(
children: [
TextSpan(
text: user.id == StreamChat.of(context).currentUser?.id
? context.translations.youText
: user.name,
),
if (channelName != null) ...[
TextSpan(
text: ' ${context.translations.inText} ',
style: textStyle?.copyWith(
fontWeight: FontWeight.normal,
),
),
),
Text(
channelName as String,
style: textStyle,
),
TextSpan(
text: channelName as String,
),
],
],
],
),
style: textStyle,
);
}
}