diff --git a/ElementX/Sources/Screens/RoomScreen/View/Timeline/AudioRoomTimelineView.swift b/ElementX/Sources/Screens/RoomScreen/View/Timeline/AudioRoomTimelineView.swift index 7a77511a1..3b1e20262 100644 --- a/ElementX/Sources/Screens/RoomScreen/View/Timeline/AudioRoomTimelineView.swift +++ b/ElementX/Sources/Screens/RoomScreen/View/Timeline/AudioRoomTimelineView.swift @@ -22,15 +22,15 @@ struct AudioRoomTimelineView: View { var body: some View { TimelineStyler(timelineItem: timelineItem) { - HStack(spacing: 8) { - Image(systemName: "waveform") - .foregroundColor(.compound.iconPrimary) - FormattedBodyText(text: timelineItem.content.body) - } - .padding(.vertical, 12) - .padding(.horizontal, 6) - .accessibilityElement(children: .ignore) - .accessibilityLabel(L10n.commonAudio) + Label(title: { Text(timelineItem.body) }, + icon: { Image(systemName: "waveform") + .foregroundColor(.compound.iconPrimary) + }) + .labelStyle(RoomTimelineViewLabelStyle()) + .font(.compound.bodyLG) + .padding(.vertical, 12) + .padding(.horizontal, 6) + .accessibilityLabel(L10n.commonAudio) } } } diff --git a/ElementX/Sources/Screens/RoomScreen/View/Timeline/FileRoomTimelineView.swift b/ElementX/Sources/Screens/RoomScreen/View/Timeline/FileRoomTimelineView.swift index 878ececdf..5b73fc3c9 100644 --- a/ElementX/Sources/Screens/RoomScreen/View/Timeline/FileRoomTimelineView.swift +++ b/ElementX/Sources/Screens/RoomScreen/View/Timeline/FileRoomTimelineView.swift @@ -22,15 +22,15 @@ struct FileRoomTimelineView: View { var body: some View { TimelineStyler(timelineItem: timelineItem) { - HStack(spacing: 8) { - Image(systemName: "doc.text.fill") - .foregroundColor(.compound.iconPrimary) - FormattedBodyText(text: timelineItem.content.body) - } - .padding(.vertical, 12) - .padding(.horizontal, 6) - .accessibilityElement(children: .ignore) - .accessibilityLabel(L10n.commonFile) + Label(title: { Text(timelineItem.body) }, + icon: { Image(systemName: "doc.text.fill") + .foregroundColor(.compound.iconPrimary) + }) + .labelStyle(RoomTimelineViewLabelStyle()) + .font(.compound.bodyLG) + .padding(.vertical, 12) + .padding(.horizontal, 6) + .accessibilityLabel(L10n.commonFile) } } } diff --git a/UnitTests/__Snapshots__/PreviewTests/test_audioRoomTimelineView.1.png b/UnitTests/__Snapshots__/PreviewTests/test_audioRoomTimelineView.1.png index 049ab8c5e..ec1cf07d4 100644 --- a/UnitTests/__Snapshots__/PreviewTests/test_audioRoomTimelineView.1.png +++ b/UnitTests/__Snapshots__/PreviewTests/test_audioRoomTimelineView.1.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6d79fc74c53d0b9001c3c469ddfaaaae67bac83146c29bb7933bcdcdc6d7a546 -size 67422 +oid sha256:60591d3b921be8e0449eff01a29c03dd34fe0df9da14ac077a076516503d0134 +size 68797 diff --git a/UnitTests/__Snapshots__/PreviewTests/test_audioRoomTimelineView.2.png b/UnitTests/__Snapshots__/PreviewTests/test_audioRoomTimelineView.2.png index 91393ee8f..7ddbdf642 100644 --- a/UnitTests/__Snapshots__/PreviewTests/test_audioRoomTimelineView.2.png +++ b/UnitTests/__Snapshots__/PreviewTests/test_audioRoomTimelineView.2.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9e3f82ed34294f70855c13967e9881481b8e700aa5695b8b9b65896e49f0a10c -size 66577 +oid sha256:408bd526a86056fe3a93e33b091b9a1d0843ecce108386910c360733f9cc435e +size 66166 diff --git a/UnitTests/__Snapshots__/PreviewTests/test_fileRoomTimelineView.1.png b/UnitTests/__Snapshots__/PreviewTests/test_fileRoomTimelineView.1.png index c3dc36bfd..843929022 100644 --- a/UnitTests/__Snapshots__/PreviewTests/test_fileRoomTimelineView.1.png +++ b/UnitTests/__Snapshots__/PreviewTests/test_fileRoomTimelineView.1.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e49434ff72e4fe94999f623a60992bd0c35f7ec67968a5105b7d42ce8d74e442 -size 106187 +oid sha256:c29168c844d44ff43e500b92a3ca7aa08bd82692e65597ef23740eee811eebef +size 99722 diff --git a/UnitTests/__Snapshots__/PreviewTests/test_fileRoomTimelineView.2.png b/UnitTests/__Snapshots__/PreviewTests/test_fileRoomTimelineView.2.png index a671cabbc..d761a210e 100644 --- a/UnitTests/__Snapshots__/PreviewTests/test_fileRoomTimelineView.2.png +++ b/UnitTests/__Snapshots__/PreviewTests/test_fileRoomTimelineView.2.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:baacc230fa282161dcec13955c39ac3fb5ec2ea362b5a7cbf958786d2db5334b -size 93074 +oid sha256:ab266b7f2a1a202f89091a69c62304f8cea2b82687740ead1ed1c21f16158681 +size 92039 diff --git a/UnitTests/__Snapshots__/PreviewTests/test_timelineItemBubbledStylerView.Thread-decorator.png b/UnitTests/__Snapshots__/PreviewTests/test_timelineItemBubbledStylerView.Thread-decorator.png index e740053cd..112e49809 100644 --- a/UnitTests/__Snapshots__/PreviewTests/test_timelineItemBubbledStylerView.Thread-decorator.png +++ b/UnitTests/__Snapshots__/PreviewTests/test_timelineItemBubbledStylerView.Thread-decorator.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:133dee03484e95e107891b9e296940696ffa3fd28f933b0c05224ed8e457c2f3 -size 605928 +oid sha256:c1601948825e15b538825f9696f498d1331f766de087e99770ce8d8c12c8486c +size 607660 diff --git a/UnitTests/__Snapshots__/PreviewTests/test_timelineItemPlainStylerView.Threads.png b/UnitTests/__Snapshots__/PreviewTests/test_timelineItemPlainStylerView.Threads.png index 7a5fa4b00..d7b00f15d 100644 --- a/UnitTests/__Snapshots__/PreviewTests/test_timelineItemPlainStylerView.Threads.png +++ b/UnitTests/__Snapshots__/PreviewTests/test_timelineItemPlainStylerView.Threads.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6972305327f7ee70b462d3b517c01c6f85d2f59ef43c9bf1f0e02685ccd49584 -size 296370 +oid sha256:a762de5fa3e74880e1c7a723b1ad24273dbc897d3c3a5ae0df04180846ff79aa +size 300803 diff --git a/changelog.d/1810.bugfix b/changelog.d/1810.bugfix new file mode 100644 index 000000000..a433f80d4 --- /dev/null +++ b/changelog.d/1810.bugfix @@ -0,0 +1 @@ +Improved the wrapping of the text for File and Audio timeline items. \ No newline at end of file