fix(ui): fix giphy attachment tap callback

This commit is contained in:
Salvatore Giordano
2021-09-16 12:22:00 +02:00
parent 1179c6a109
commit 99e4d724d6
@@ -253,22 +253,7 @@ class GiphyAttachment extends AttachmentWidget {
Widget _buildSentAttachment(BuildContext context, String imageUrl) =>
SizedBox(
child: GestureDetector(
onTap: () async {
final res =
await Navigator.push(context, MaterialPageRoute(builder: (_) {
final channel = StreamChannel.of(context).channel;
return StreamChannel(
channel: channel,
child: FullScreenMedia(
mediaAttachments: [attachment],
userName: message.user?.name,
message: message,
onShowMessage: onShowMessage,
),
);
}));
if (res != null) onReturnAction!(res);
},
onTap: () => onAttachmentTap ?? _onImageTap(context),
child: Stack(
children: [
CachedNetworkImage(