mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
[WIP] Post suggestion
This commit is contained in:
@@ -527,7 +527,15 @@ public final class ChatInterfaceState: Codable, Equatable {
|
||||
return nil
|
||||
} else {
|
||||
let sourceText = expandedInputStateAttributedString(self.composeInputState.inputText)
|
||||
return SynchronizeableChatInputState(replySubject: self.replyMessageSubject?.subjectModel, text: sourceText.string, entities: generateChatInputTextEntities(sourceText), timestamp: self.timestamp, textSelection: self.composeInputState.selectionRange, messageEffectId: self.sendMessageEffect)
|
||||
|
||||
let suggestedPost = self.postSuggestionState.flatMap { postSuggestionState -> SynchronizeableChatInputState.SuggestedPost in
|
||||
return SynchronizeableChatInputState.SuggestedPost(
|
||||
price: postSuggestionState.price,
|
||||
timestamp: postSuggestionState.timestamp
|
||||
)
|
||||
}
|
||||
|
||||
return SynchronizeableChatInputState(replySubject: self.replyMessageSubject?.subjectModel, text: sourceText.string, entities: generateChatInputTextEntities(sourceText), timestamp: self.timestamp, textSelection: self.composeInputState.selectionRange, messageEffectId: self.sendMessageEffect, suggestedPost: suggestedPost)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user