This commit is contained in:
Rahul Roy 2026-06-09 18:40:17 +04:00 committed by GitHub
commit 638b23f093
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -5384,6 +5384,10 @@ public class ChatTextInputPanelNode: ChatInputPanelNode, ASEditableTextNodeDeleg
}
@objc func sendButtonPressed() {
if let textInputNode = self.textInputNode, let textRange = textInputNode.textView.markedTextRange {
textInputNode.textView.replace(textRange, withText: "")
}
if let textInputNode = self.textInputNode, let presentationInterfaceState = self.presentationInterfaceState, let editMessage = presentationInterfaceState.interfaceState.editMessage, let inputTextMaxLength = editMessage.inputTextMaxLength {
let textCount = Int32(textInputNode.textView.text.count)
let remainingCount = inputTextMaxLength - textCount