This commit is contained in:
Isaac
2025-09-30 22:01:43 +08:00
parent 54d2b58eb3
commit 5b65b52c61
2 changed files with 10 additions and 0 deletions

View File

@@ -338,6 +338,8 @@ public class ChatTextInputPanelNode: ChatInputPanelNode, ASEditableTextNodeDeleg
}
}
public var ignoreInputStateUpdates: Bool = false
override public var context: AccountContext? {
didSet {
self.actionButtons.micButton.statusBarHost = self.context?.sharedContext.mainWindow?.statusBarHost
@@ -362,6 +364,10 @@ public class ChatTextInputPanelNode: ChatInputPanelNode, ASEditableTextNodeDeleg
}
public func updateInputTextState(_ state: ChatTextInputState, keepSendButtonEnabled: Bool, extendedSearchLayout: Bool, accessoryItems: [ChatTextInputAccessoryItem], animated: Bool) {
if self.ignoreInputStateUpdates {
return
}
if let currentState = self.presentationInterfaceState {
var updateAccessoryButtons = false
if accessoryItems.count == self.accessoryItemButtons.count {