Fix apple intelligence gesture conflict

This commit is contained in:
Isaac 2025-05-07 22:07:40 +01:00
parent a523f70a14
commit 4e9d624877

View File

@ -539,6 +539,7 @@ class ChatTextInputPanelNode: ChatInputPanelNode, ASEditableTextNodeDelegate, Ch
var customEmojiContainerView: CustomEmojiContainerView?
let textInputBackgroundNode: ASImageNode
var textInputBackgroundTapRecognizer: TouchDownGestureRecognizer?
private var transparentTextInputBackgroundImage: UIImage?
let actionButtons: ChatTextInputActionButtonsNode
private let slowModeButton: BoostSlowModeButton
@ -1089,6 +1090,7 @@ class ChatTextInputPanelNode: ChatInputPanelNode, ASEditableTextNodeDelegate, Ch
return false
}
}
self.textInputBackgroundTapRecognizer = recognizer
self.textInputBackgroundNode.isUserInteractionEnabled = true
self.textInputBackgroundNode.view.addGestureRecognizer(recognizer)
@ -1166,6 +1168,11 @@ class ChatTextInputPanelNode: ChatInputPanelNode, ASEditableTextNodeDelegate, Ch
textInputNode.isUserInteractionEnabled = !self.sendingTextDisabled
self.textInputNode = textInputNode
if let textInputBackgroundTapRecognizer = self.textInputBackgroundTapRecognizer {
self.textInputBackgroundTapRecognizer = nil
self.textInputBackgroundNode.view.removeGestureRecognizer(textInputBackgroundTapRecognizer)
}
var accessoryButtonsWidth: CGFloat = 0.0
var firstButton = true
for (_, button) in self.accessoryItemButtons {