Voice Chat UI fixes

This commit is contained in:
Ilya Laktyushin 2020-12-06 21:32:45 +04:00
parent c1d731400f
commit 00c8eab23e
2 changed files with 5 additions and 13 deletions

View File

@ -189,12 +189,12 @@ final class NavigationModalContainer: ASDisplayNode, UIScrollViewDelegate, UIGes
@objc func dimTapGesture(_ recognizer: UITapGestureRecognizer) {
if case .ended = recognizer.state {
if !self.isDismissed {
self.dismisWithAnimation()
self.dismissWithAnimation()
}
}
}
private func dismisWithAnimation() {
private func dismissWithAnimation() {
let scrollView = self.scrollNode.view
let targetOffset: CGFloat
let duration = 0.3

View File

@ -1038,6 +1038,9 @@ public final class VoiceChatController: ViewController {
override func didLoad() {
super.didLoad()
self.view.disablesInteractiveTransitionGestureRecognizer = true
self.view.disablesInteractiveModalDismiss = true
self.dimNode.view.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(self.dimTapGesture(_:))))
let longTapRecognizer = UILongPressGestureRecognizer(target: self, action: #selector(self.actionButtonPressGesture(_:)))
@ -1049,17 +1052,6 @@ public final class VoiceChatController: ViewController {
panRecognizer.delegate = self
panRecognizer.delaysTouchesBegan = false
panRecognizer.cancelsTouchesInView = true
// panRecognizer.shouldBegin = { [weak self] point in
// guard let strongSelf = self else {
// return false
// }
// if strongSelf.topPanelNode.bounds.contains(strongSelf.view.convert(point, to: strongSelf.topPanelNode.view)) {
// if strongSelf.topPanelNode.frame.maxY <= strongSelf.listNode.frame.minY {
// return true
// }
// }
// return false
// }
self.view.addGestureRecognizer(panRecognizer)
}