mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-06 12:28:29 +00:00
Update the font style for placeholder messages (redacted/encrypted/unsupported). (#4927)
This commit is contained in:
+8
-16
@@ -14,19 +14,11 @@ struct UnsupportedRoomTimelineView: View {
|
||||
|
||||
var body: some View {
|
||||
TimelineStyler(timelineItem: timelineItem) {
|
||||
Label {
|
||||
VStack(alignment: .leading, spacing: 0) {
|
||||
Text("\(timelineItem.body): \(timelineItem.eventType)")
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
|
||||
Text(timelineItem.error)
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
.font(.compound.bodySM)
|
||||
}
|
||||
} icon: {
|
||||
CompoundIcon(\.warning, size: .small, relativeTo: .compound.bodyLG)
|
||||
}
|
||||
.labelStyle(RoomTimelineViewLabelStyle())
|
||||
Label("\(timelineItem.body) (\(timelineItem.eventType)): \(timelineItem.error)",
|
||||
icon: \.warning,
|
||||
iconSize: .small,
|
||||
relativeTo: .compound.bodyLG)
|
||||
.labelStyle(RoomTimelineViewPlaceholderLabelStyle())
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -40,7 +32,7 @@ struct UnsupportedRoomTimelineView_Previews: PreviewProvider, TestablePreview {
|
||||
|
||||
static var body: some View {
|
||||
VStack(alignment: .leading, spacing: 20.0) {
|
||||
UnsupportedRoomTimelineView(timelineItem: itemWith(text: "Text",
|
||||
UnsupportedRoomTimelineView(timelineItem: itemWith(text: "Unsupported",
|
||||
timestamp: .mock,
|
||||
isOutgoing: false,
|
||||
senderId: "Bob"))
|
||||
@@ -55,8 +47,8 @@ struct UnsupportedRoomTimelineView_Previews: PreviewProvider, TestablePreview {
|
||||
private static func itemWith(text: String, timestamp: Date, isOutgoing: Bool, senderId: String) -> UnsupportedRoomTimelineItem {
|
||||
UnsupportedRoomTimelineItem(id: .randomEvent,
|
||||
body: text,
|
||||
eventType: "Some Event Type",
|
||||
error: "Something went wrong",
|
||||
eventType: "event.type",
|
||||
error: "something went wrong",
|
||||
timestamp: timestamp,
|
||||
isOutgoing: isOutgoing,
|
||||
isEditable: false,
|
||||
|
||||
Reference in New Issue
Block a user