From bcdb996993ded6ef56ef95bda134eb9a831e5eb1 Mon Sep 17 00:00:00 2001 From: Igor Solomennikov Date: Tue, 10 Jan 2023 14:58:31 -0800 Subject: [PATCH] Fix an issue where message context menu would appear unexpectedly. Delete the code that would allow "long tap to show context menu" gesture to be recognized simultaneously with scroll view's pan gesture. That would cause message context menu to appear whenever user would stop inertia scrolling with a tap and keep the finger on the screen. --- .../ConversationViewController+GestureRecognizers.swift | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Signal/src/ViewControllers/ConversationView/ConversationViewController+GestureRecognizers.swift b/Signal/src/ViewControllers/ConversationView/ConversationViewController+GestureRecognizers.swift index 0f0143261e..e4a2a0bb4d 100644 --- a/Signal/src/ViewControllers/ConversationView/ConversationViewController+GestureRecognizers.swift +++ b/Signal/src/ViewControllers/ConversationView/ConversationViewController+GestureRecognizers.swift @@ -83,12 +83,6 @@ extension ConversationViewController: UIGestureRecognizerDelegate { } public func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer) -> Bool { - - // Allow the context menu gesture recognizer to recognize simultaneously with scroll - if gestureRecognizer == collectionViewContextMenuGestureRecognizer && otherGestureRecognizer == collectionView.panGestureRecognizer { - return true - } - // Support standard long press recognizing for body text cases, and context menu long press recognizing for everything else let currentIsLongPressOrTap = (gestureRecognizer == collectionViewLongPressGestureRecognizer || gestureRecognizer == collectionViewContextMenuGestureRecognizer || gestureRecognizer == collectionViewTapGestureRecognizer) let otherIsLongPressOrTap = (otherGestureRecognizer == collectionViewLongPressGestureRecognizer || otherGestureRecognizer == collectionViewContextMenuGestureRecognizer || otherGestureRecognizer == collectionViewTapGestureRecognizer)