Revert code that should've been fixed before merging the previous PR.

This commit is contained in:
Stefan Ceriu 2023-10-11 18:24:52 +03:00
parent c358150449
commit 7842ca831a

View File

@ -91,7 +91,10 @@ struct MessageText: UIViewRepresentable {
return textView
}
func updateUIView(_ uiView: MessageTextView, context: Context) { }
func updateUIView(_ uiView: MessageTextView, context: Context) {
uiView.attributedText = NSAttributedString(attributedString)
context.coordinator.openURLAction = openURLAction
}
func sizeThatFits(_ proposal: ProposedViewSize, uiView: MessageTextView, context: Context) -> CGSize? {
let proposalWidth = proposal.width ?? UIView.layoutFittingExpandedSize.width