mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 14:45:21 +00:00
Various improvements
This commit is contained in:
@@ -901,21 +901,30 @@ public final class TextFieldComponent: Component {
|
||||
if self.textView.inputView == nil {
|
||||
self.textView.inputView = inputView
|
||||
if self.textView.isFirstResponder {
|
||||
self.textView.reloadInputViews()
|
||||
// Avoid layout cycle
|
||||
DispatchQueue.main.async { [weak self] in
|
||||
self?.textView.reloadInputViews()
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if component.hideKeyboard {
|
||||
if self.textView.inputView == nil {
|
||||
self.textView.inputView = EmptyInputView()
|
||||
if self.textView.isFirstResponder {
|
||||
self.textView.reloadInputViews()
|
||||
// Avoid layout cycle
|
||||
DispatchQueue.main.async { [weak self] in
|
||||
self?.textView.reloadInputViews()
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if self.textView.inputView != nil {
|
||||
self.textView.inputView = nil
|
||||
if self.textView.isFirstResponder {
|
||||
self.textView.reloadInputViews()
|
||||
// Avoid layout cycle
|
||||
DispatchQueue.main.async { [weak self] in
|
||||
self?.textView.reloadInputViews()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user