From 99e4d724d6979282d9f92f931570cc50ab94a2ce Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Thu, 16 Sep 2021 12:20:30 +0200 Subject: [PATCH] fix(ui): fix giphy attachment tap callback --- .../lib/src/attachment/giphy_attachment.dart | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/packages/stream_chat_flutter/lib/src/attachment/giphy_attachment.dart b/packages/stream_chat_flutter/lib/src/attachment/giphy_attachment.dart index 7eb2606e..2210ef39 100644 --- a/packages/stream_chat_flutter/lib/src/attachment/giphy_attachment.dart +++ b/packages/stream_chat_flutter/lib/src/attachment/giphy_attachment.dart @@ -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(