Update PlayerV2

This commit is contained in:
Isaac
2025-01-14 22:49:26 +08:00
parent 8aeb7f8143
commit 4d66f53230
17 changed files with 172 additions and 33 deletions

View File

@@ -54,6 +54,7 @@ final class VideoNavigationControllerDropContentItem: NavigationControllerDropCo
}
private final class ChatControllerNodeView: UITracingLayerView, WindowInputAccessoryHeightProvider {
weak var node: ChatControllerNode?
var inputAccessoryHeight: (() -> CGFloat)?
var hitTestImpl: ((CGPoint, UIEvent?) -> UIView?)?
@@ -65,7 +66,17 @@ private final class ChatControllerNodeView: UITracingLayerView, WindowInputAcces
if let result = self.hitTestImpl?(point, event) {
return result
}
return super.hitTest(point, with: event)
guard let result = super.hitTest(point, with: event) else {
return nil
}
if let node = self.node {
if result === node.historyNodeContainer.view {
if node.historyNode.alpha == 0.0 {
return nil
}
}
}
return result
}
}
@@ -172,7 +183,7 @@ class ChatControllerNode: ASDisplayNode, ASScrollViewDelegate {
private(set) var validLayout: (ContainerViewLayout, CGFloat)?
private var visibleAreaInset = UIEdgeInsets()
private var searchNavigationNode: ChatSearchNavigationContentNode?
private(set) var searchNavigationNode: ChatSearchNavigationContentNode?
private var navigationModalFrame: NavigationModalFrame?
@@ -727,6 +738,8 @@ class ChatControllerNode: ASDisplayNode, ASScrollViewDelegate {
return ChatControllerNodeView()
})
(self.view as? ChatControllerNodeView)?.node = self
(self.view as? ChatControllerNodeView)?.inputAccessoryHeight = { [weak self] in
if let strongSelf = self {
return strongSelf.getWindowInputAccessoryHeight()