From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: alina sireneva <alina@tei.su>
Date: Thu, 2 Jul 2026 20:43:38 +0400
Subject: cancel pending long press when reply touch is cancelled

---
 .../src/main/java/org/telegram/ui/Cells/ChatMessageCell.java    | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Cells/ChatMessageCell.java b/TMessagesProj/src/main/java/org/telegram/ui/Cells/ChatMessageCell.java
index 0000000..0000000 100644
--- a/TMessagesProj/src/main/java/org/telegram/ui/Cells/ChatMessageCell.java
+++ b/TMessagesProj/src/main/java/org/telegram/ui/Cells/ChatMessageCell.java
@@ -4872,6 +4872,7 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
                 }
             }
         } else if (event.getAction() == MotionEvent.ACTION_CANCEL) {
+            if (replyPressed) cancelCheckLongPress();
             replyPressed = false;
             replySelectorPressed = false;
             if (replySelector != null) {
@@ -4883,6 +4884,7 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
             }
         } else if (event.getAction() == MotionEvent.ACTION_MOVE) {
             if (!(x >= replyStartX && x <= replyEnd && y >= replyStartY && y <= replyStartY + replyHeight)) {
+                if (replyPressed) cancelCheckLongPress();
                 replyPressed = false;
                 replySelectorPressed = false;
                 replySelectorCanBePressed = false;
