mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Fix media selection
This commit is contained in:
parent
92e70edef9
commit
e43b4b1b02
@ -16,6 +16,7 @@ import ChatInterfaceState
|
||||
import FastBlur
|
||||
import ConfettiEffect
|
||||
import WallpaperBackgroundNode
|
||||
import GridMessageSelectionNode
|
||||
|
||||
final class VideoNavigationControllerDropContentItem: NavigationControllerDropContentItem {
|
||||
let itemNode: OverlayMediaItemNode
|
||||
@ -2176,7 +2177,7 @@ class ChatControllerNode: ASDisplayNode, UIScrollViewDelegate {
|
||||
override func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? {
|
||||
switch self.chatPresentationInterfaceState.mode {
|
||||
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 as? ChatMessageSelectionNode {
|
||||
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 {
|
||||
return result
|
||||
}
|
||||
if let result = self.navigateButtons.hitTest(self.view.convert(point, to: self.navigateButtons.view), with: event) {
|
||||
|
@ -3343,17 +3343,14 @@ class ChatMessageBubbleItemNode: ChatMessageItemView, ChatMessagePreviewItemNode
|
||||
return parent
|
||||
} else if let parent = parent as? GridMessageSelectionNode, parent.bounds.contains(point) {
|
||||
return parent
|
||||
} else {
|
||||
if let parentSubnodes = parent.subnodes {
|
||||
for subnode in parentSubnodes {
|
||||
let subnodeFrame = subnode.frame
|
||||
if let result = traceSelectionNodes(parent: subnode, point: point.offsetBy(dx: -subnodeFrame.minX, dy: -subnodeFrame.minY)) {
|
||||
return result
|
||||
}
|
||||
} else if let parentSubnodes = parent.subnodes {
|
||||
for subnode in parentSubnodes {
|
||||
if let result = traceSelectionNodes(parent: subnode, point: point.offsetBy(dx: -subnode.frame.minX + subnode.bounds.minX, dy: -subnode.frame.minY + subnode.bounds.minY)) {
|
||||
return result
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
override func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? {
|
||||
|
Loading…
x
Reference in New Issue
Block a user