Various Fixes

This commit is contained in:
Ilya Laktyushin
2022-01-12 14:10:21 +03:00
parent 057a7cc148
commit d668c55322
60 changed files with 64 additions and 11 deletions

View File

@@ -274,7 +274,7 @@ public final class ChatInterfaceState: Codable, Equatable {
public let inputLanguage: String?
public var synchronizeableInputState: SynchronizeableChatInputState? {
if self.composeInputState.inputText.length == 0 {
if self.composeInputState.inputText.string.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty && self.replyMessageId == nil {
return nil
} else {
return SynchronizeableChatInputState(replyToMessageId: self.replyMessageId, text: self.composeInputState.inputText.string, entities: generateChatInputTextEntities(self.composeInputState.inputText), timestamp: self.timestamp, textSelection: self.composeInputState.selectionRange)