[WIP] Post suggestion

This commit is contained in:
Isaac
2025-06-17 13:55:44 +04:00
parent f1efac862b
commit 06eaf81fa9
43 changed files with 529 additions and 215 deletions

View File

@@ -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)
}
}