Poll emoji improvements

This commit is contained in:
Isaac
2024-04-22 19:21:35 +04:00
parent d577885518
commit ba55877c44
11 changed files with 271 additions and 97 deletions

View File

@@ -305,7 +305,14 @@ public final class TextFieldComponent: Component {
}
public func insertText(_ text: NSAttributedString) {
guard let component = self.component else {
return
}
self.updateInputState { state in
if let characterLimit = component.characterLimit, state.inputText.length + text.length > characterLimit {
return state
}
return state.insertText(text)
}
if !self.isUpdating {