fix(ui): fix giphy attachment tap callback
This commit is contained in:
@@ -98,7 +98,13 @@ class GiphyAttachment extends AttachmentWidget {
|
|||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.all(2),
|
padding: const EdgeInsets.all(2),
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
onTap: () => onAttachmentTap ?? _onImageTap(context),
|
onTap: () {
|
||||||
|
if (onAttachmentTap != null) {
|
||||||
|
onAttachmentTap?.call();
|
||||||
|
} else {
|
||||||
|
_onImageTap(context);
|
||||||
|
}
|
||||||
|
},
|
||||||
child: CachedNetworkImage(
|
child: CachedNetworkImage(
|
||||||
height: size?.height,
|
height: size?.height,
|
||||||
width: size?.width,
|
width: size?.width,
|
||||||
@@ -253,7 +259,13 @@ class GiphyAttachment extends AttachmentWidget {
|
|||||||
Widget _buildSentAttachment(BuildContext context, String imageUrl) =>
|
Widget _buildSentAttachment(BuildContext context, String imageUrl) =>
|
||||||
SizedBox(
|
SizedBox(
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
onTap: () => onAttachmentTap ?? _onImageTap(context),
|
onTap: () {
|
||||||
|
if (onAttachmentTap != null) {
|
||||||
|
onAttachmentTap?.call();
|
||||||
|
} else {
|
||||||
|
_onImageTap(context);
|
||||||
|
}
|
||||||
|
},
|
||||||
child: Stack(
|
child: Stack(
|
||||||
children: [
|
children: [
|
||||||
CachedNetworkImage(
|
CachedNetworkImage(
|
||||||
|
|||||||
Reference in New Issue
Block a user