allow override reactions tap
This commit is contained in:
@@ -55,6 +55,7 @@ class StreamMessageWidget extends StatefulWidget {
|
|||||||
this.attachmentBorderRadiusGeometry,
|
this.attachmentBorderRadiusGeometry,
|
||||||
this.onMentionTap,
|
this.onMentionTap,
|
||||||
this.onMessageTap,
|
this.onMessageTap,
|
||||||
|
this.onReactionsTap,
|
||||||
bool? showReactionPicker,
|
bool? showReactionPicker,
|
||||||
@Deprecated('Use `showReactionPicker` instead')
|
@Deprecated('Use `showReactionPicker` instead')
|
||||||
bool showReactionPickerIndicator = true,
|
bool showReactionPickerIndicator = true,
|
||||||
@@ -563,6 +564,9 @@ class StreamMessageWidget extends StatefulWidget {
|
|||||||
/// {@macro onMessageTap}
|
/// {@macro onMessageTap}
|
||||||
final void Function(Message)? onMessageTap;
|
final void Function(Message)? onMessageTap;
|
||||||
|
|
||||||
|
/// {@macro onReactionsTap}
|
||||||
|
final OnReactionsTap? onReactionsTap;
|
||||||
|
|
||||||
/// {@template customActions}
|
/// {@template customActions}
|
||||||
/// List of custom actions shown on message long tap
|
/// List of custom actions shown on message long tap
|
||||||
/// {@endtemplate}
|
/// {@endtemplate}
|
||||||
@@ -657,6 +661,7 @@ class StreamMessageWidget extends StatefulWidget {
|
|||||||
bool? translateUserAvatar,
|
bool? translateUserAvatar,
|
||||||
OnQuotedMessageTap? onQuotedMessageTap,
|
OnQuotedMessageTap? onQuotedMessageTap,
|
||||||
void Function(Message)? onMessageTap,
|
void Function(Message)? onMessageTap,
|
||||||
|
OnReactionsTap? onReactionsTap,
|
||||||
List<StreamMessageAction>? customActions,
|
List<StreamMessageAction>? customActions,
|
||||||
void Function(Message message, Attachment attachment)? onAttachmentTap,
|
void Function(Message message, Attachment attachment)? onAttachmentTap,
|
||||||
Widget Function(BuildContext, User)? userAvatarBuilder,
|
Widget Function(BuildContext, User)? userAvatarBuilder,
|
||||||
@@ -746,6 +751,7 @@ class StreamMessageWidget extends StatefulWidget {
|
|||||||
translateUserAvatar: translateUserAvatar ?? this.translateUserAvatar,
|
translateUserAvatar: translateUserAvatar ?? this.translateUserAvatar,
|
||||||
onQuotedMessageTap: onQuotedMessageTap ?? this.onQuotedMessageTap,
|
onQuotedMessageTap: onQuotedMessageTap ?? this.onQuotedMessageTap,
|
||||||
onMessageTap: onMessageTap ?? this.onMessageTap,
|
onMessageTap: onMessageTap ?? this.onMessageTap,
|
||||||
|
onReactionsTap: onReactionsTap ?? this.onReactionsTap,
|
||||||
customActions: customActions ?? this.customActions,
|
customActions: customActions ?? this.customActions,
|
||||||
onAttachmentTap: onAttachmentTap ?? this.onAttachmentTap,
|
onAttachmentTap: onAttachmentTap ?? this.onAttachmentTap,
|
||||||
userAvatarBuilder: userAvatarBuilder ?? this.userAvatarBuilder,
|
userAvatarBuilder: userAvatarBuilder ?? this.userAvatarBuilder,
|
||||||
@@ -986,7 +992,11 @@ class _StreamMessageWidgetState extends State<StreamMessageWidget>
|
|||||||
showPinHighlight: widget.showPinHighlight,
|
showPinHighlight: widget.showPinHighlight,
|
||||||
showReactionPickerTail: widget.showReactionPickerTail,
|
showReactionPickerTail: widget.showReactionPickerTail,
|
||||||
showReactions: showReactions,
|
showReactions: showReactions,
|
||||||
onReactionsTap: () => _showMessageReactionsModal(context),
|
onReactionsTap: () {
|
||||||
|
widget.onReactionsTap != null ? widget.onReactionsTap!(
|
||||||
|
widget.message
|
||||||
|
) : _showMessageReactionsModal(context);
|
||||||
|
},
|
||||||
showUserAvatar: widget.showUserAvatar,
|
showUserAvatar: widget.showUserAvatar,
|
||||||
streamChat: _streamChat,
|
streamChat: _streamChat,
|
||||||
translateUserAvatar: widget.translateUserAvatar,
|
translateUserAvatar: widget.translateUserAvatar,
|
||||||
|
|||||||
@@ -230,6 +230,11 @@ typedef OnQuotedMessageTap = void Function(String?);
|
|||||||
/// {@endtemplate}
|
/// {@endtemplate}
|
||||||
typedef OnMessageTap = void Function(Message);
|
typedef OnMessageTap = void Function(Message);
|
||||||
|
|
||||||
|
/// {@template onReactionsTap}
|
||||||
|
/// The action to perform when a message's reactions are tapped.
|
||||||
|
/// {@endtemplate}
|
||||||
|
typedef OnReactionsTap = void Function(Message);
|
||||||
|
|
||||||
/// {@template messageSearchItemTapCallback}
|
/// {@template messageSearchItemTapCallback}
|
||||||
/// The action to perform when tapping or clicking on a user in a
|
/// The action to perform when tapping or clicking on a user in a
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
|
|||||||
Reference in New Issue
Block a user