Cancel reaction gesture after long tap

This commit is contained in:
Peter 2019-08-20 23:57:30 +03:00
parent ab4381a520
commit caa75cbc86
2 changed files with 5 additions and 0 deletions

View File

@ -170,4 +170,8 @@ public final class ReactionSwipeGestureRecognizer: UIPanGestureRecognizer {
self.state = .ended self.state = .ended
} }
} }
public func cancel() {
self.state = .cancelled
}
} }

View File

@ -354,6 +354,7 @@ class ChatMessageBubbleItemNode: ChatMessageItemView, ChatMessagePrevewItemNode
guard let strongSelf = self else { guard let strongSelf = self else {
return return
} }
strongSelf.reactionRecognizer?.cancel()
if strongSelf.gestureRecognized(gesture: .longTap, location: point, recognizer: recognizer) { if strongSelf.gestureRecognized(gesture: .longTap, location: point, recognizer: recognizer) {
recognizer.cancel() recognizer.cancel()
} }