From 626d3d5564dbd9e9c9ef72b76decbe3f94d46175 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Elias=20M=C3=BCller?= <elias@elias-mueller.com>
Date: Sun, 9 Feb 2025 15:16:02 +0100
Subject: [PATCH] added minimum message drag distance for chat reply

---
 lib/view/pages/talk/components/chatBubble.dart | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/view/pages/talk/components/chatBubble.dart b/lib/view/pages/talk/components/chatBubble.dart
index ab1975f..6e72b52 100644
--- a/lib/view/pages/talk/components/chatBubble.dart
+++ b/lib/view/pages/talk/components/chatBubble.dart
@@ -282,14 +282,15 @@ class _ChatBubbleState extends State<ChatBubble> with SingleTickerProviderStateM
             if(!widget.bubbleData.isReplyable) return;
             var dx = details.delta.dx - _dragStartPosition.dx;
             setState(() {
-              _position = (_position.dx + dx).abs() > 30 ? Offset(_position.dx, 0) : Offset(_position.dx + dx, 0);
+              _position = (_position.dx + dx).abs() > 60 ? Offset(_position.dx, 0) : Offset(_position.dx + dx, 0);
             });
           },
           onHorizontalDragEnd: (DragEndDetails details) {
+            var isAction = _position.dx.abs() > 50;
             setState(() {
               _position = const Offset(0, 0);
             });
-            if(widget.bubbleData.isReplyable) {
+            if(widget.bubbleData.isReplyable && isAction) {
               Provider.of<ChatProps>(context, listen: false).setReferenceMessageId(widget.bubbleData.id, context, widget.chatData.token);
             }
           },