Skip to content

Commit

Permalink
Message tap interception fix
Browse files Browse the repository at this point in the history
This commit allows tap recognizer handle events simultaneously with other recognizers, so fixes conflict of tapping on message UITextView

MOB-3597
  • Loading branch information
Egor Egorov authored and EgorovEI committed Oct 18, 2024
1 parent cac0104 commit 138d711
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions GliaWidgets/Sources/View/Chat/Message/VisitorChatMessageView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,20 @@ class VisitorChatMessageView: ChatMessageView {
target: self,
action: #selector(tapped)
)
tapRecognizer.delegate = self
addGestureRecognizer(tapRecognizer)
}

@objc private func tapped() {
messageTapped?()
}
}

extension VisitorChatMessageView: UIGestureRecognizerDelegate {
func gestureRecognizer(
_ gestureRecognizer: UIGestureRecognizer,
shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer
) -> Bool {
true
}
}

0 comments on commit 138d711

Please sign in to comment.