From 61a1eecc52a643310ed879441090decca7606924 Mon Sep 17 00:00:00 2001 From: Sahil Kumar Date: Tue, 5 Jan 2021 12:22:19 +0530 Subject: [PATCH] [MessageWidget] Disable onLongPress for deleted message Signed-off-by: Sahil Kumar --- lib/src/message_widget.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/src/message_widget.dart b/lib/src/message_widget.dart index 0c108681..bc6646c5 100644 --- a/lib/src/message_widget.dart +++ b/lib/src/message_widget.dart @@ -291,7 +291,9 @@ class _MessageWidgetState extends State { type: MaterialType.transparency, child: Portal( child: InkWell( - onLongPress: () => onLongPress(context), + onLongPress: widget.message.isDeleted && !isFailedState + ? null + : () => onLongPress(context), child: Padding( padding: widget.padding ?? EdgeInsets.all(8), child: Transform(