fix: on reply callback not used

This commit is contained in:
Gordon Hayes
2022-11-25 17:58:03 +01:00
parent ddd8310b96
commit 16615705b1
3 changed files with 8 additions and 3 deletions
@@ -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(