Merge commit '752fe09e641a7baa92a4f1c0f2581f4422ce5e72'

This commit is contained in:
Ali 2022-07-25 22:04:05 +02:00
commit b594e260fe
4 changed files with 16 additions and 0 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -2668,6 +2668,12 @@ class ChatControllerNode: ASDisplayNode, UIScrollViewDelegate {
} }
override func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? { override func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? {
if let inputMediaNode = self.inputMediaNode, self.inputNode === inputMediaNode {
let convertedPoint = self.view.convert(point, to: inputMediaNode.view)
if inputMediaNode.point(inside: convertedPoint, with: event) {
return inputMediaNode.hitTest(convertedPoint, with: event)
}
}
switch self.chatPresentationInterfaceState.mode { switch self.chatPresentationInterfaceState.mode {
case .standard(previewing: true): case .standard(previewing: true):
if let result = self.historyNode.view.hitTest(self.view.convert(point, to: self.historyNode.view), with: event), let node = result.asyncdisplaykit_node, node is ChatMessageSelectionNode || node is GridMessageSelectionNode { if let result = self.historyNode.view.hitTest(self.view.convert(point, to: self.historyNode.view), with: event), let node = result.asyncdisplaykit_node, node is ChatMessageSelectionNode || node is GridMessageSelectionNode {

View File

@ -2659,6 +2659,15 @@ final class ChatMediaInputNode: ChatInputNode {
self.updatePaneClippingContainer(size: self.paneClippingContainer.bounds.size, offset: collectionListPanelOffset, transition: transition) self.updatePaneClippingContainer(size: self.paneClippingContainer.bounds.size, offset: collectionListPanelOffset, transition: transition)
} }
override func point(inside point: CGPoint, with event: UIEvent?) -> Bool {
if self.panelIsFocused {
if point.y > -41.0 {
return true
}
}
return super.point(inside: point, with: event)
}
override func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? { override func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? {
if self.panelIsFocused { if self.panelIsFocused {
if point.y > -41.0 && point.y < 38.0 { if point.y > -41.0 && point.y < 38.0 {

View File

@ -52,6 +52,7 @@ public func navigateToChatControllerImpl(_ params: NavigateToChatControllerParam
} }
params.completion(controller) params.completion(controller)
} }
controller.purposefulAction = params.purposefulAction controller.purposefulAction = params.purposefulAction
if params.activateInput { if params.activateInput {
controller.activateInput() controller.activateInput()