From 61ad7180079b5378762c35f240602b836e7382ea 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_mediaEventsTimelineScreen-iPad-en-GB.Media.png | 4 ++-- .../test_mediaEventsTimelineScreen-iPad-pseudo.Media.png | 4 ++-- .../test_mediaEventsTimelineScreen-iPhone-16-en-GB.Media.png | 4 ++-- .../test_mediaEventsTimelineScreen-iPhone-16-pseudo.Media.png | 4 ++-- .../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 ++-- 9 files changed, 17 insertions(+), 17 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_mediaEventsTimelineScreen-iPad-en-GB.Media.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_mediaEventsTimelineScreen-iPad-en-GB.Media.png index 9d80bf98f9..af0c0932ec 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_mediaEventsTimelineScreen-iPad-en-GB.Media.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_mediaEventsTimelineScreen-iPad-en-GB.Media.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:812ec06c83ea2c361241ea77163a23156a22ee4535ed50ab86e1f5aec130e342 -size 779101 +oid sha256:8c63ab40372661a448449f81e772cff9e05615a5ed4f027996984a46ee201bf5 +size 779262 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_mediaEventsTimelineScreen-iPad-pseudo.Media.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_mediaEventsTimelineScreen-iPad-pseudo.Media.png index 212a989339..208393b866 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_mediaEventsTimelineScreen-iPad-pseudo.Media.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_mediaEventsTimelineScreen-iPad-pseudo.Media.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:47e5e4eb18390da554bb8a6ce643eb7ee9d677d4b98235874de95e1ac484b19b -size 781617 +oid sha256:3d9a1af757a18d9ab7d3ff8d7ac18a29a41ca54f61a6ffc5bea5fdf5692fe8ed +size 786023 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_mediaEventsTimelineScreen-iPhone-16-en-GB.Media.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_mediaEventsTimelineScreen-iPhone-16-en-GB.Media.png index 766d21c5f0..c1e0f6eba4 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_mediaEventsTimelineScreen-iPhone-16-en-GB.Media.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_mediaEventsTimelineScreen-iPhone-16-en-GB.Media.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5f0a4d5ae4dc218dc9a24f0cf7f73c71f99fc9cc2c62e20b7d1bba7d949a273c -size 857546 +oid sha256:71d2fe4ff56b2f7f457f341570aa9b55a61cd699f3969a3841ca8757b0529403 +size 857564 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_mediaEventsTimelineScreen-iPhone-16-pseudo.Media.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_mediaEventsTimelineScreen-iPhone-16-pseudo.Media.png index d2083736db..f18fb9a5cf 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_mediaEventsTimelineScreen-iPhone-16-pseudo.Media.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_mediaEventsTimelineScreen-iPhone-16-pseudo.Media.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:177b94dea4f1fc4eead6438dfc9dcf94ad5b1f1c209660691aa587e8c6a2dd11 -size 862850 +oid sha256:cebdb3063cf19ef4fe6194c6d6cb014bed63daf15580ba7cfdaf1f2ea04d117e +size 863167 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