From fc63a7c6ba6e34c5db05f060d86985cb61673743 Mon Sep 17 00:00:00 2001 From: Stefan Ceriu Date: Mon, 16 Dec 2024 18:06:25 +0200 Subject: [PATCH] Fix video item duration formatting --- .../View/TimelineViews/VideoMediaEventsTimelineView.swift | 2 +- .../test_videoMediaEventsTimelineView-iPad-en-GB.1.png | 4 ++-- .../test_videoMediaEventsTimelineView-iPad-pseudo.1.png | 4 ++-- .../test_videoMediaEventsTimelineView-iPhone-16-en-GB.1.png | 4 ++-- .../test_videoMediaEventsTimelineView-iPhone-16-pseudo.1.png | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ElementX/Sources/Screens/MediaEventsTimelineScreen/View/TimelineViews/VideoMediaEventsTimelineView.swift b/ElementX/Sources/Screens/MediaEventsTimelineScreen/View/TimelineViews/VideoMediaEventsTimelineView.swift index 2932d710d9..08ea45da79 100644 --- a/ElementX/Sources/Screens/MediaEventsTimelineScreen/View/TimelineViews/VideoMediaEventsTimelineView.swift +++ b/ElementX/Sources/Screens/MediaEventsTimelineScreen/View/TimelineViews/VideoMediaEventsTimelineView.swift @@ -44,7 +44,7 @@ struct VideoMediaEventsTimelineView: View { HStack(spacing: 0) { CompoundIcon(\.videoCallSolid) Spacer() - Text(Date(timeIntervalSince1970: timelineItem.content.videoInfo.duration).formattedTime()) + Text(Duration.seconds(timelineItem.content.videoInfo.duration).formatted(.time(pattern: .minuteSecond))) } .padding(8) .background { diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_videoMediaEventsTimelineView-iPad-en-GB.1.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_videoMediaEventsTimelineView-iPad-en-GB.1.png index 8630686ad3..96a62f0d24 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_videoMediaEventsTimelineView-iPad-en-GB.1.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_videoMediaEventsTimelineView-iPad-en-GB.1.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ed840d795c1c117436307a02af3668cfd0091d9831572b5d0724acf34290a962 -size 119624 +oid sha256:4a50a7265055b6ffceed4ee63d3d162c32eeb922629d40a40dcda275d836a238 +size 119650 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_videoMediaEventsTimelineView-iPad-pseudo.1.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_videoMediaEventsTimelineView-iPad-pseudo.1.png index 2eabcf25d8..96a62f0d24 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_videoMediaEventsTimelineView-iPad-pseudo.1.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_videoMediaEventsTimelineView-iPad-pseudo.1.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9a44591168a07d0e590384b128045159dbf9707b89c9e3cac462857770ba215b -size 119534 +oid sha256:4a50a7265055b6ffceed4ee63d3d162c32eeb922629d40a40dcda275d836a238 +size 119650 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_videoMediaEventsTimelineView-iPhone-16-en-GB.1.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_videoMediaEventsTimelineView-iPhone-16-en-GB.1.png index bfc4446134..6714cf5736 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_videoMediaEventsTimelineView-iPhone-16-en-GB.1.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_videoMediaEventsTimelineView-iPhone-16-en-GB.1.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8a1a9ad985d1fdbb5bcbfda1f1a0987cdea236759b5905cdc63abc45a4ec35f3 -size 109469 +oid sha256:951340c103ad1445e8ca3c40f7f46388e0ed7f301bfea84cebad63240862221c +size 109436 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_videoMediaEventsTimelineView-iPhone-16-pseudo.1.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_videoMediaEventsTimelineView-iPhone-16-pseudo.1.png index 55656ea1d0..6714cf5736 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_videoMediaEventsTimelineView-iPhone-16-pseudo.1.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_videoMediaEventsTimelineView-iPhone-16-pseudo.1.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1001b44cee3b02729073c1ee91a41872b5eca901dd09a414e2e05ed63b412cf0 -size 109394 +oid sha256:951340c103ad1445e8ca3c40f7f46388e0ed7f301bfea84cebad63240862221c +size 109436