mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2026-01-06 21:22:44 +00:00
Merge commit 'bab231a71f5d11524f251185a7eb35ba338bb1d6'
This commit is contained in:
@@ -66,10 +66,8 @@ public final class WallpaperBackgroundNode: ASDisplayNode {
|
||||
self.addSubnode(self.contentNode)
|
||||
}
|
||||
|
||||
override public func layout() {
|
||||
super.layout()
|
||||
self.contentNode.bounds = self.bounds
|
||||
self.contentNode.position = CGPoint(x: self.bounds.midX, y: self.bounds.midY)
|
||||
self.updateScale()
|
||||
public func updateLayout(size: CGSize, transition: ContainedViewLayoutTransition) {
|
||||
transition.updatePosition(node: self.contentNode, position: CGPoint(x: size.width / 2.0, y: size.height / 2.0))
|
||||
transition.updateBounds(node: self.contentNode, bounds: CGRect(origin: CGPoint(), size: size))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -125,8 +125,8 @@ private func encodeText(_ string: String, _ key: Int) -> String {
|
||||
return result
|
||||
}
|
||||
|
||||
public func doesViewTreeDisableInteractiveTransitionGestureRecognizer(_ view: UIView) -> Bool {
|
||||
if view.disablesInteractiveTransitionGestureRecognizer {
|
||||
public func doesViewTreeDisableInteractiveTransitionGestureRecognizer(_ view: UIView, keyboardOnly: Bool = false) -> Bool {
|
||||
if view.disablesInteractiveTransitionGestureRecognizer && !keyboardOnly {
|
||||
return true
|
||||
}
|
||||
if view.disablesInteractiveKeyboardGestureRecognizer {
|
||||
@@ -136,7 +136,7 @@ public func doesViewTreeDisableInteractiveTransitionGestureRecognizer(_ view: UI
|
||||
return true
|
||||
}
|
||||
if let superview = view.superview {
|
||||
return doesViewTreeDisableInteractiveTransitionGestureRecognizer(superview)
|
||||
return doesViewTreeDisableInteractiveTransitionGestureRecognizer(superview, keyboardOnly: keyboardOnly)
|
||||
}
|
||||
return false
|
||||
}
|
||||
@@ -1065,7 +1065,7 @@ public class Window1 {
|
||||
if let inputHeight = self.windowLayout.inputHeight, !inputHeight.isZero, keyboardGestureBeginLocation.y < self.windowLayout.size.height - inputHeight - (accessoryHeight ?? 0.0) {
|
||||
var enableGesture = true
|
||||
if let view = self.hostView.containerView.hitTest(location, with: nil) {
|
||||
if doesViewTreeDisableInteractiveTransitionGestureRecognizer(view) {
|
||||
if doesViewTreeDisableInteractiveTransitionGestureRecognizer(view, keyboardOnly: true) {
|
||||
enableGesture = false
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user