Attachment menu improvements

This commit is contained in:
Ilya Laktyushin
2022-02-26 22:06:43 +04:00
parent 970203e0dc
commit b8e0fe64f2
10 changed files with 157 additions and 15 deletions

View File

@@ -96,6 +96,14 @@ final class AttachmentContainer: ASDisplayNode, UIGestureRecognizerDelegate {
self.wrappingNode.view.addGestureRecognizer(panRecognizer)
}
func cancelPanGesture() {
if let panGestureRecognizer = self.panGestureRecognizer, panGestureRecognizer.isEnabled {
self.panGestureArguments = nil
panGestureRecognizer.isEnabled = false
panGestureRecognizer.isEnabled = true
}
}
override func gestureRecognizerShouldBegin(_ gestureRecognizer: UIGestureRecognizer) -> Bool {
if let (layout, _, _) = self.validLayout {
if case .regular = layout.metrics.widthClass {