Use a Date for the timestamp in all timeline items. (#3590)

* Use a Date for the timestamp in all timeline items.

* UI test snapshots.

* Update snapshots

---------

Co-authored-by: Stefan Ceriu <stefanc@matrix.org>
This commit is contained in:
Doug
2024-12-06 13:55:29 +00:00
committed by GitHub
parent 176a8b880a
commit a9e4837b62
235 changed files with 522 additions and 510 deletions
@@ -32,16 +32,16 @@ struct EmoteRoomTimelineView_Previews: PreviewProvider, TestablePreview {
static var body: some View {
VStack(alignment: .leading, spacing: 20.0) {
EmoteRoomTimelineView(timelineItem: itemWith(text: "Short loin ground round tongue hamburger, fatback salami shoulder. Beef turkey sausage kielbasa strip steak. Alcatra capicola pig tail pancetta chislic.",
timestamp: "Now",
timestamp: .mock,
senderId: "Bob"))
EmoteRoomTimelineView(timelineItem: itemWith(text: "Some other text",
timestamp: "Later",
timestamp: .mock,
senderId: "Anne"))
}
}
private static func itemWith(text: String, timestamp: String, senderId: String) -> EmoteRoomTimelineItem {
private static func itemWith(text: String, timestamp: Date, senderId: String) -> EmoteRoomTimelineItem {
EmoteRoomTimelineItem(id: .randomEvent,
timestamp: timestamp,
isOutgoing: false,