Always open keyboard when setting up a reply

This commit is contained in:
Isaac 2025-05-27 19:30:50 +08:00
parent 3b275b5e98
commit 545140337b
2 changed files with 12 additions and 2 deletions

View File

@ -1536,7 +1536,14 @@ extension ChatControllerImpl {
completion(t, {}) completion(t, {})
}) })
strongSelf.updateItemNodesSearchTextHighlightStates() strongSelf.updateItemNodesSearchTextHighlightStates()
strongSelf.chatDisplayNode.ensureInputViewFocused() if !strongSelf.chatDisplayNode.ensureInputViewFocused() {
DispatchQueue.main.async { [weak self] in
guard let self else {
return
}
self.chatDisplayNode.ensureInputViewFocused()
}
}
} else { } else {
completion(.immediate, {}) completion(.immediate, {})
} }

View File

@ -3792,9 +3792,12 @@ class ChatControllerNode: ASDisplayNode, ASScrollViewDelegate {
} }
} }
func ensureInputViewFocused() { @discardableResult func ensureInputViewFocused() -> Bool {
if let inputPanelNode = self.inputPanelNode as? ChatTextInputPanelNode { if let inputPanelNode = self.inputPanelNode as? ChatTextInputPanelNode {
inputPanelNode.ensureFocused() inputPanelNode.ensureFocused()
return true
} else {
return false
} }
} }