Merge pull request #1391 from GetStream/fix/onReply-in-attachment-action-modal

This commit is contained in:
Sahil Kumar
2022-12-06 14:32:46 +05:30
committed by GitHub
4 changed files with 11 additions and 3 deletions
@@ -9,6 +9,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`.
- [[#1347]](https://github.com/GetStream/stream-chat-flutter/issues/1347) `onReply` not working in `AttachmentActionsModal` which is used by `StreamImageAttachment` and `StreamImageGroup`.
## 5.1.0
@@ -300,6 +300,7 @@ class _ChannelPageState extends State<ChannelPage> {
@override
void dispose() {
focusNode.dispose();
messageInputController.dispose();
super.dispose();
}
}
@@ -33,10 +33,10 @@ class AttachmentActionsModal extends StatelessWidget {
/// Callback to download [attachment].
final AttachmentDownloader? attachmentDownloader;
/// Show reply option
/// Show "reply" option
final bool showReply;
/// Show show in chat option
/// Show "show in chat" option
final bool showShowInChat;
/// Show save option
@@ -55,6 +55,7 @@ class AttachmentActionsModal extends StatelessWidget {
Attachment? attachment,
Message? message,
VoidCallback? onShowMessage,
VoidCallback? onReply,
AttachmentDownloader? attachmentDownloader,
bool? showReply,
bool? showShowInChat,
@@ -67,6 +68,7 @@ class AttachmentActionsModal extends StatelessWidget {
attachment: attachment ?? this.attachment,
message: message ?? this.message,
onShowMessage: onShowMessage ?? this.onShowMessage,
onReply: onReply ?? this.onReply,
attachmentDownloader: attachmentDownloader ?? this.attachmentDownloader,
showReply: showReply ?? this.showReply,
showShowInChat: showShowInChat ?? this.showShowInChat,
@@ -112,7 +114,7 @@ class AttachmentActionsModal extends StatelessWidget {
size: 24,
color: theme.colorTheme.textLowEmphasis,
),
() => Navigator.of(context).pop(ReturnActionType.reply),
onReply,
),
if (showShowInChat)
_buildButton(
@@ -1,4 +1,8 @@
// TODO: remove in v6 as this is no longer used. Currently exported.
/// Return action for coming back from pages
@Deprecated('''
ReturnActionType has been deprecated and is no longer used.''')
enum ReturnActionType {
/// No return action
none,