Skip to content

Commit 4afc504

Browse files
authored
fix(ui): onThreadTap has been added in MessageWidgetContent to enable thread tap action. (#1988)
1 parent e19e361 commit 4afc504

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

packages/stream_chat_flutter/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
- Fixed null errors in web from markdown.
2323
- Fixed bug causing background events to be sent in foreground.
24+
- Added `onThreadTap` parameter to `MessageWidgetContent` to enable thread tap action.
2425

2526
## 7.3.0
2627

packages/stream_chat_flutter/lib/src/message_widget/message_widget.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -726,6 +726,7 @@ class _StreamMessageWidgetState extends State<StreamMessageWidget>
726726
attachmentShape: widget.attachmentShape,
727727
onAttachmentTap: widget.onAttachmentTap,
728728
onReplyTap: widget.onReplyTap,
729+
onThreadTap: widget.onThreadTap,
729730
onShowMessage: widget.onShowMessage,
730731
attachmentActionsModalBuilder:
731732
widget.attachmentActionsModalBuilder,

packages/stream_chat_flutter/lib/src/message_widget/message_widget_content.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ class MessageWidgetContent extends StatelessWidget {
6363
required this.showUsername,
6464
required this.showEditedLabel,
6565
required this.messageWidget,
66+
required this.onThreadTap,
6667
this.onUserAvatarTap,
6768
this.borderRadiusGeometry,
6869
this.borderSide,
@@ -160,6 +161,9 @@ class MessageWidgetContent extends StatelessWidget {
160161
/// {@macro onReplyTap}
161162
final void Function(Message)? onReplyTap;
162163

164+
/// {@macro onThreadTap}
165+
final void Function(Message)? onThreadTap;
166+
163167
/// {@macro attachmentActionsBuilder}
164168
final AttachmentActionsBuilder? attachmentActionsModalBuilder;
165169

@@ -429,6 +433,7 @@ class MessageWidgetContent extends StatelessWidget {
429433

430434
Widget _buildBottomRow(BuildContext context) {
431435
final defaultWidget = BottomRow(
436+
onThreadTap: onThreadTap,
432437
message: message,
433438
reverse: reverse,
434439
messageTheme: messageTheme,

0 commit comments

Comments
 (0)