mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-11-07 17:30:12 +00:00
Voice Chat UI fixes
This commit is contained in:
parent
c1d731400f
commit
00c8eab23e
@ -189,12 +189,12 @@ final class NavigationModalContainer: ASDisplayNode, UIScrollViewDelegate, UIGes
|
|||||||
@objc func dimTapGesture(_ recognizer: UITapGestureRecognizer) {
|
@objc func dimTapGesture(_ recognizer: UITapGestureRecognizer) {
|
||||||
if case .ended = recognizer.state {
|
if case .ended = recognizer.state {
|
||||||
if !self.isDismissed {
|
if !self.isDismissed {
|
||||||
self.dismisWithAnimation()
|
self.dismissWithAnimation()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private func dismisWithAnimation() {
|
private func dismissWithAnimation() {
|
||||||
let scrollView = self.scrollNode.view
|
let scrollView = self.scrollNode.view
|
||||||
let targetOffset: CGFloat
|
let targetOffset: CGFloat
|
||||||
let duration = 0.3
|
let duration = 0.3
|
||||||
|
|||||||
@ -1038,6 +1038,9 @@ public final class VoiceChatController: ViewController {
|
|||||||
override func didLoad() {
|
override func didLoad() {
|
||||||
super.didLoad()
|
super.didLoad()
|
||||||
|
|
||||||
|
self.view.disablesInteractiveTransitionGestureRecognizer = true
|
||||||
|
self.view.disablesInteractiveModalDismiss = true
|
||||||
|
|
||||||
self.dimNode.view.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(self.dimTapGesture(_:))))
|
self.dimNode.view.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(self.dimTapGesture(_:))))
|
||||||
|
|
||||||
let longTapRecognizer = UILongPressGestureRecognizer(target: self, action: #selector(self.actionButtonPressGesture(_:)))
|
let longTapRecognizer = UILongPressGestureRecognizer(target: self, action: #selector(self.actionButtonPressGesture(_:)))
|
||||||
@ -1049,17 +1052,6 @@ public final class VoiceChatController: ViewController {
|
|||||||
panRecognizer.delegate = self
|
panRecognizer.delegate = self
|
||||||
panRecognizer.delaysTouchesBegan = false
|
panRecognizer.delaysTouchesBegan = false
|
||||||
panRecognizer.cancelsTouchesInView = true
|
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)
|
self.view.addGestureRecognizer(panRecognizer)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user