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.
This commit is contained in:
parent
a283045058
commit
bcdb996993
@ -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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user