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) => Widget _buildSentAttachment(BuildContext context, String imageUrl) =>
SizedBox( SizedBox(
child: GestureDetector( child: GestureDetector(
onTap: () async { onTap: () => onAttachmentTap ?? _onImageTap(context),
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);
},
child: Stack( child: Stack(
children: [ children: [
CachedNetworkImage( CachedNetworkImage(