mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Added link detection in plain text (not available ootb in SwiftUI) and support for user, room, event and group identifiers + room aliases.
This commit is contained in:
@@ -30,7 +30,7 @@ struct RoomTimelineItemFactory {
|
||||
|
||||
switch roomMessage {
|
||||
case let message as TextRoomMessage:
|
||||
let attributedText = attributedStringBuilder.fromHTML(message.htmlBody)
|
||||
let attributedText = attributedStringBuilder.fromHTML(message.htmlBody ?? message.body)
|
||||
let attributedComponents = attributedStringBuilder.blockquoteCoalescedComponentsFrom(attributedText)
|
||||
|
||||
return TextRoomTimelineItem(id: message.id,
|
||||
|
||||
@@ -15,8 +15,8 @@ struct TextRoomTimelineView: View {
|
||||
var body: some View {
|
||||
VStack(alignment: .leading) {
|
||||
EventBasedTimelineView(timelineItem: timelineItem)
|
||||
if let components = timelineItem.attributedComponents {
|
||||
FormattedBodyText(attributedComponents: components)
|
||||
if let attributedComponents = timelineItem.attributedComponents {
|
||||
FormattedBodyText(attributedComponents: attributedComponents)
|
||||
} else {
|
||||
Text(timelineItem.text)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user