From 9bc0b04ae014f8557380d58ccc84bc8989e2456e Mon Sep 17 00:00:00 2001 From: Stefan Ceriu Date: Thu, 12 Dec 2024 14:03:58 +0200 Subject: [PATCH 1/3] Extract the timeline item background from the BubbledStyler. --- ElementX.xcodeproj/project.pbxproj | 4 ++ .../Style/TimelineItemBubbleBackground.swift | 54 +++++++++++++++++++ .../Style/TimelineItemBubbledStylerView.swift | 35 ++---------- 3 files changed, 61 insertions(+), 32 deletions(-) create mode 100644 ElementX/Sources/Screens/Timeline/View/Style/TimelineItemBubbleBackground.swift diff --git a/ElementX.xcodeproj/project.pbxproj b/ElementX.xcodeproj/project.pbxproj index 95bc0c8b5d..40470737d2 100644 --- a/ElementX.xcodeproj/project.pbxproj +++ b/ElementX.xcodeproj/project.pbxproj @@ -133,6 +133,7 @@ 1795EA6A6C4942CAE0459DF0 /* SecureBackupKeyBackupScreenViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82B612853BFB68373249777B /* SecureBackupKeyBackupScreenViewModel.swift */; }; 17BC15DA08A52587466698C5 /* RoomMessageEventStringBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80E815FF3CC5E5A355E3A25E /* RoomMessageEventStringBuilder.swift */; }; 1801F1467ABCEA080419E150 /* preview_avatar_user.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 87FC42213E86E8182CFD3A49 /* preview_avatar_user.jpg */; }; + 186CE9332D0AFD13001D37CB /* TimelineItemBubbleBackground.swift in Sources */ = {isa = PBXBuildFile; fileRef = 186CE9322D0AFD13001D37CB /* TimelineItemBubbleBackground.swift */; }; 18867F4F1C8991EEC56EA932 /* UTType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 897DF5E9A70CE05A632FC8AF /* UTType.swift */; }; 18978C9438206828C1D5AF2A /* test_animated_image.gif in Resources */ = {isa = PBXBuildFile; fileRef = 53FD6D3D38F556CEAA280C58 /* test_animated_image.gif */; }; 18E3786918486D4C9726BC84 /* FormButtonStyles.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89FBFC09F9DAFF1E4BA97849 /* FormButtonStyles.swift */; }; @@ -1417,6 +1418,7 @@ 17F7A723A46DF5C95BE15EBF /* clear.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = clear.png; sourceTree = ""; }; 18486B87745B1811E7FBD3D2 /* AnalyticsPromptScreenModels.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnalyticsPromptScreenModels.swift; sourceTree = ""; }; 184CF8C196BE143AE226628D /* DecorationTimelineItemProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DecorationTimelineItemProtocol.swift; sourceTree = ""; }; + 186CE9322D0AFD13001D37CB /* TimelineItemBubbleBackground.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimelineItemBubbleBackground.swift; sourceTree = ""; }; 18F2958E6D247AE2516BEEE8 /* ClientProxy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClientProxy.swift; sourceTree = ""; }; 18FE0CDF1FFA92EA7EE17B0B /* RoomTimelineControllerFactoryProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomTimelineControllerFactoryProtocol.swift; sourceTree = ""; }; 190EC7285D3CFEF0D3011BCF /* GeoURI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GeoURI.swift; sourceTree = ""; }; @@ -3105,6 +3107,7 @@ 753B4C6C0EDDCBF0708DC384 /* TimelineItemSendInfoLabel.swift */, 6CD4823EAB4B4E8BAB4F6B8C /* TimelineStyle.swift */, 2DB0E533508094156D8024C3 /* TimelineStyler.swift */, + 186CE9322D0AFD13001D37CB /* TimelineItemBubbleBackground.swift */, ); path = Style; sourceTree = ""; @@ -6891,6 +6894,7 @@ 2F09DF0CB213CAE86A3E3B67 /* EventTimelineItem.swift in Sources */, 63E46D18B91D08E15FC04125 /* ExpiringTaskRunner.swift in Sources */, 36206F74DDEBF9BEAF6A6A1F /* ExtensionLogger.swift in Sources */, + 186CE9332D0AFD13001D37CB /* TimelineItemBubbleBackground.swift in Sources */, 5F06AD3C66884CE793AE6119 /* FileManager.swift in Sources */, D33AC79A50DFC26D2498DD28 /* FileRoomTimelineItem.swift in Sources */, 37D789F24199B32E3FD1AA7B /* FileRoomTimelineItemContent.swift in Sources */, diff --git a/ElementX/Sources/Screens/Timeline/View/Style/TimelineItemBubbleBackground.swift b/ElementX/Sources/Screens/Timeline/View/Style/TimelineItemBubbleBackground.swift new file mode 100644 index 0000000000..2bb7c2369d --- /dev/null +++ b/ElementX/Sources/Screens/Timeline/View/Style/TimelineItemBubbleBackground.swift @@ -0,0 +1,54 @@ +// +// Copyright 2024 New Vector Ltd. +// +// SPDX-License-Identifier: AGPL-3.0-only +// Please see LICENSE in the repository root for full details. +// + +import SwiftUI + +extension View { + func bubbleBackground(timelineItem: EventBasedTimelineItemProtocol, + insets: EdgeInsets, + color: Color? = nil) -> some View { + modifier(TimelineItemBubbleBackgroundModifier(timelineItem: timelineItem, + insets: insets, + color: color)) + } +} + +private struct TimelineItemBubbleBackgroundModifier: ViewModifier { + @Environment(\.timelineGroupStyle) private var timelineGroupStyle + + let timelineItem: EventBasedTimelineItemProtocol + let insets: EdgeInsets + var color: Color? + + func body(content: Content) -> some View { + content + .padding(insets) + .background(color) + .cornerRadius(12, corners: roundedCorners) + } + + private var roundedCorners: UIRectCorner { + switch timelineGroupStyle { + case .single: + return .allCorners + case .first: + if timelineItem.isOutgoing { + return [.topLeft, .topRight, .bottomLeft] + } else { + return [.topLeft, .topRight, .bottomRight] + } + case .middle: + return timelineItem.isOutgoing ? [.topLeft, .bottomLeft] : [.topRight, .bottomRight] + case .last: + if timelineItem.isOutgoing { + return [.topLeft, .bottomLeft, .bottomRight] + } else { + return [.topRight, .bottomLeft, .bottomRight] + } + } + } +} diff --git a/ElementX/Sources/Screens/Timeline/View/Style/TimelineItemBubbledStylerView.swift b/ElementX/Sources/Screens/Timeline/View/Style/TimelineItemBubbledStylerView.swift index 72152cf986..b4245e7a4d 100644 --- a/ElementX/Sources/Screens/Timeline/View/Style/TimelineItemBubbledStylerView.swift +++ b/ElementX/Sources/Screens/Timeline/View/Style/TimelineItemBubbledStylerView.swift @@ -163,9 +163,9 @@ struct TimelineItemBubbledStylerView: View { var messageBubble: some View { contentWithReply .timelineItemSendInfo(timelineItem: timelineItem, adjustedDeliveryStatus: adjustedDeliveryStatus, context: context) - .bubbleStyle(insets: timelineItem.bubbleInsets, - color: timelineItem.bubbleBackgroundColor, - corners: roundedCorners) + .bubbleBackground(timelineItem: timelineItem, + insets: timelineItem.bubbleInsets, + color: timelineItem.bubbleBackgroundColor) } @ViewBuilder @@ -217,40 +217,11 @@ struct TimelineItemBubbledStylerView: View { timelineItem.isOutgoing ? .trailing : .leading } - private var roundedCorners: UIRectCorner { - switch timelineGroupStyle { - case .single: - return .allCorners - case .first: - if timelineItem.isOutgoing { - return [.topLeft, .topRight, .bottomLeft] - } else { - return [.topLeft, .topRight, .bottomRight] - } - case .middle: - return timelineItem.isOutgoing ? [.topLeft, .bottomLeft] : [.topRight, .bottomRight] - case .last: - if timelineItem.isOutgoing { - return [.topLeft, .bottomLeft, .bottomRight] - } else { - return [.topRight, .bottomLeft, .bottomRight] - } - } - } - private var shouldShowSenderDetails: Bool { timelineGroupStyle.shouldShowSenderDetails } } -private extension View { - func bubbleStyle(insets: EdgeInsets, color: Color? = nil, cornerRadius: CGFloat = 12, corners: UIRectCorner) -> some View { - padding(insets) - .background(color) - .cornerRadius(cornerRadius, corners: corners) - } -} - private extension EventBasedTimelineItemProtocol { var bubbleBackgroundColor: Color? { let defaultColor: Color = isOutgoing ? .compound._bgBubbleOutgoing : .compound._bgBubbleIncoming From 37c45f8012954418c059c3c6152a38d9b65a54ee Mon Sep 17 00:00:00 2001 From: Stefan Ceriu Date: Thu, 12 Dec 2024 16:01:02 +0200 Subject: [PATCH 2/3] Use different views for files and voices messages, reuse the timeline content but only keep the bubble background instead of the whole TimelineStyler. --- ElementX.xcodeproj/project.pbxproj | 70 ++++++++++++------- .../View/MediaEventsTimelineScreen.swift | 23 +++--- .../AudioFileEventsTimelineView.swift | 61 ++++++++++++++++ .../FileMediaEventsTimelineView.swift | 70 +++++++++++++++++++ .../VoiceMessageMediaEventsTimelineView.swift | 60 ++++++++++++++++ .../VoiceMessageRoomTimelineView.swift | 33 +++++---- .../Sources/GeneratedPreviewTests.swift | 18 +++++ ...ioMediaEventsTimelineView-iPad-en-GB.1.png | 3 + ...oMediaEventsTimelineView-iPad-pseudo.1.png | 3 + ...iaEventsTimelineView-iPhone-16-en-GB.1.png | 3 + ...aEventsTimelineView-iPhone-16-pseudo.1.png | 3 + ...leMediaEventsTimelineView-iPad-en-GB.1.png | 3 + ...eMediaEventsTimelineView-iPad-pseudo.1.png | 3 + ...iaEventsTimelineView-iPhone-16-en-GB.1.png | 3 + ...aEventsTimelineView-iPhone-16-pseudo.1.png | 3 + ...aEventsTimelineScreen-iPad-en-GB.Files.png | 4 +- ...EventsTimelineScreen-iPad-pseudo.Files.png | 4 +- ...tsTimelineScreen-iPhone-16-en-GB.Files.png | 4 +- ...sTimelineScreen-iPhone-16-pseudo.Files.png | 4 +- ...geMediaEventsTimelineView-iPad-en-GB.1.png | 3 + ...eMediaEventsTimelineView-iPad-pseudo.1.png | 3 + ...iaEventsTimelineView-iPhone-16-en-GB.1.png | 3 + ...aEventsTimelineView-iPhone-16-pseudo.1.png | 3 + ...sageRoomTimelineView-iPad-en-GB.Bubble.png | 4 +- ...ageRoomTimelineView-iPad-pseudo.Bubble.png | 4 +- 25 files changed, 333 insertions(+), 62 deletions(-) create mode 100644 ElementX/Sources/Screens/MediaEventsTimelineScreen/View/TimelineViews/AudioFileEventsTimelineView.swift create mode 100644 ElementX/Sources/Screens/MediaEventsTimelineScreen/View/TimelineViews/FileMediaEventsTimelineView.swift create mode 100644 ElementX/Sources/Screens/MediaEventsTimelineScreen/View/TimelineViews/VoiceMessageMediaEventsTimelineView.swift create mode 100644 PreviewTests/Sources/__Snapshots__/PreviewTests/test_audioMediaEventsTimelineView-iPad-en-GB.1.png create mode 100644 PreviewTests/Sources/__Snapshots__/PreviewTests/test_audioMediaEventsTimelineView-iPad-pseudo.1.png create mode 100644 PreviewTests/Sources/__Snapshots__/PreviewTests/test_audioMediaEventsTimelineView-iPhone-16-en-GB.1.png create mode 100644 PreviewTests/Sources/__Snapshots__/PreviewTests/test_audioMediaEventsTimelineView-iPhone-16-pseudo.1.png create mode 100644 PreviewTests/Sources/__Snapshots__/PreviewTests/test_fileMediaEventsTimelineView-iPad-en-GB.1.png create mode 100644 PreviewTests/Sources/__Snapshots__/PreviewTests/test_fileMediaEventsTimelineView-iPad-pseudo.1.png create mode 100644 PreviewTests/Sources/__Snapshots__/PreviewTests/test_fileMediaEventsTimelineView-iPhone-16-en-GB.1.png create mode 100644 PreviewTests/Sources/__Snapshots__/PreviewTests/test_fileMediaEventsTimelineView-iPhone-16-pseudo.1.png create mode 100644 PreviewTests/Sources/__Snapshots__/PreviewTests/test_voiceMessageMediaEventsTimelineView-iPad-en-GB.1.png create mode 100644 PreviewTests/Sources/__Snapshots__/PreviewTests/test_voiceMessageMediaEventsTimelineView-iPad-pseudo.1.png create mode 100644 PreviewTests/Sources/__Snapshots__/PreviewTests/test_voiceMessageMediaEventsTimelineView-iPhone-16-en-GB.1.png create mode 100644 PreviewTests/Sources/__Snapshots__/PreviewTests/test_voiceMessageMediaEventsTimelineView-iPhone-16-pseudo.1.png diff --git a/ElementX.xcodeproj/project.pbxproj b/ElementX.xcodeproj/project.pbxproj index 40470737d2..0e4464da32 100644 --- a/ElementX.xcodeproj/project.pbxproj +++ b/ElementX.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 56; + objectVersion = 54; objects = { /* Begin PBXAggregateTarget section */ @@ -133,7 +133,6 @@ 1795EA6A6C4942CAE0459DF0 /* SecureBackupKeyBackupScreenViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82B612853BFB68373249777B /* SecureBackupKeyBackupScreenViewModel.swift */; }; 17BC15DA08A52587466698C5 /* RoomMessageEventStringBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80E815FF3CC5E5A355E3A25E /* RoomMessageEventStringBuilder.swift */; }; 1801F1467ABCEA080419E150 /* preview_avatar_user.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 87FC42213E86E8182CFD3A49 /* preview_avatar_user.jpg */; }; - 186CE9332D0AFD13001D37CB /* TimelineItemBubbleBackground.swift in Sources */ = {isa = PBXBuildFile; fileRef = 186CE9322D0AFD13001D37CB /* TimelineItemBubbleBackground.swift */; }; 18867F4F1C8991EEC56EA932 /* UTType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 897DF5E9A70CE05A632FC8AF /* UTType.swift */; }; 18978C9438206828C1D5AF2A /* test_animated_image.gif in Resources */ = {isa = PBXBuildFile; fileRef = 53FD6D3D38F556CEAA280C58 /* test_animated_image.gif */; }; 18E3786918486D4C9726BC84 /* FormButtonStyles.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89FBFC09F9DAFF1E4BA97849 /* FormButtonStyles.swift */; }; @@ -357,6 +356,7 @@ 4807E8F51DB54F56B25E1C7E /* AppLockSetupSettingsScreenViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D8C38663020DF2EB2D13F5E /* AppLockSetupSettingsScreenViewModel.swift */; }; 48416BBEB8DDF3E4DED0EDB6 /* ElementCallServiceProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FC8B21E86B137BE4E91F82A /* ElementCallServiceProtocol.swift */; }; 484202C5D50983442D24D061 /* AttributedString.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52BD6ED18E2EB61E28C340AD /* AttributedString.swift */; }; + 4870F7F72CEBEFDAD1C973A6 /* VoiceMessageMediaEventsTimelineView.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD3521DF92391551E02004D8 /* VoiceMessageMediaEventsTimelineView.swift */; }; 489BB6A733D3DA0FE7062650 /* IdentityConfirmationScreenViewModelProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C71B9802433F1B4252291BB /* IdentityConfirmationScreenViewModelProtocol.swift */; }; 491D62ACD19E6F134B1766AF /* RoomNotificationSettingsUserDefinedScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3203C6566DC17B7AECC1B7FD /* RoomNotificationSettingsUserDefinedScreen.swift */; }; 492274DA6691EE985C2FCCAA /* Sentry in Frameworks */ = {isa = PBXBuildFile; productRef = 67E7A6F388D3BF85767609D9 /* Sentry */; }; @@ -398,6 +398,7 @@ 4FF90E2242DBD596E1ED2E27 /* AppCoordinatorStateMachine.swift in Sources */ = {isa = PBXBuildFile; fileRef = 077D7C3BE199B6E5DDEC07EC /* AppCoordinatorStateMachine.swift */; }; 4FFDC274824F7CC0BBDF581E /* BugReportScreenModels.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51C2BCE0BC1FC69C1B36E688 /* BugReportScreenModels.swift */; }; 50381244BA280451771BE3ED /* PINTextFieldTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = EF13BFD415CA84B1272E94F8 /* PINTextFieldTests.swift */; }; + 5038E69A5E6A89DE1A345E04 /* ShouldScrollOnKeyboardDidShow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 832397B5C3D00A4BF52C5F0B /* ShouldScrollOnKeyboardDidShow.swift */; }; 50539366B408780B232C1910 /* EstimatedWaveformView.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD0FF64B0E6470F66F42E182 /* EstimatedWaveformView.swift */; }; 50C90117FE25390BFBD40173 /* RustTracing.swift in Sources */ = {isa = PBXBuildFile; fileRef = 542D4F49FABA056DEEEB3400 /* RustTracing.swift */; }; 5100F53E6884A15F9BA07CC3 /* AttributedStringTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37CA26F55123E36B50DB0B3A /* AttributedStringTests.swift */; }; @@ -581,6 +582,7 @@ 77BB228AEA861E50FFD6A228 /* HomeScreenEmptyStateView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0FEA560929DD73FFEF8C3DF /* HomeScreenEmptyStateView.swift */; }; 77C1A2F49CD90D3EFDF376E5 /* MapTilerURLBuildersTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 376D941BF8BB294389C0DE24 /* MapTilerURLBuildersTests.swift */; }; 77D7DAA41AAB36800C1F2E2D /* RoomTimelineProviderProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 095AED4CF56DFF3EB7BB84C8 /* RoomTimelineProviderProtocol.swift */; }; + 77E33FF0E4A50B555BF3A8AA /* AudioFileEventsTimelineView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FC9044BE0E4A66F5B963E834 /* AudioFileEventsTimelineView.swift */; }; 77FACC29F98FE2E65BBB6A5F /* ServerSelectionUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 054F469E433864CC6FE6EE8E /* ServerSelectionUITests.swift */; }; 77FB08C303F4C74C0E8577E2 /* TimelineMediaPreviewModels.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A2BB38DF61F5100B8723112 /* TimelineMediaPreviewModels.swift */; }; 7807B1DEE32617896886A8E5 /* FormattingToolbar.swift in Sources */ = {isa = PBXBuildFile; fileRef = FE1E6FAA3719E9B7A2D5510B /* FormattingToolbar.swift */; }; @@ -827,7 +829,6 @@ A6F345328CCC5C9B0DAE2257 /* LogViewerScreenViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0BB05221D7D941CC82DC8480 /* LogViewerScreenViewModel.swift */; }; A722F426FD81FC67706BB1E0 /* CustomLayoutLabelStyle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42236480CF0431535EBE8387 /* CustomLayoutLabelStyle.swift */; }; A74438ED16F8683A4B793E6A /* AnalyticsSettingsScreenViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0BCE3FAF40932AC7C7639AC4 /* AnalyticsSettingsScreenViewModel.swift */; }; - A77C2B342D09B976001A6024 /* ShouldScrollOnKeyboardDidShow.swift in Sources */ = {isa = PBXBuildFile; fileRef = A77C2B332D09B954001A6024 /* ShouldScrollOnKeyboardDidShow.swift */; }; A7D48E44D485B143AADDB77D /* Strings+Untranslated.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A18F6CE4D694D21E4EA9B25 /* Strings+Untranslated.swift */; }; A808DC3F72D15C6C5A52317E /* TimelineItemDebugView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BCDA016D05107DED3B9495CB /* TimelineItemDebugView.swift */; }; A816F7087C495D85048AC50E /* RoomMemberDetailsScreenModels.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B6E30BB748F3F480F077969 /* RoomMemberDetailsScreenModels.swift */; }; @@ -1124,6 +1125,7 @@ EA01A06EEDFEF4AE7652E5F3 /* NSRegularExpresion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95BAC0F6C9644336E9567EE6 /* NSRegularExpresion.swift */; }; EA6613B29BA671F39CE1B1D2 /* ConfirmationDialog.swift in Sources */ = {isa = PBXBuildFile; fileRef = B383DCD3DCB19E00FD478A5F /* ConfirmationDialog.swift */; }; EA78A7512AFB1E5451744EB1 /* AppRouteURLParserTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E461B3C8BBBFCA400B268D14 /* AppRouteURLParserTests.swift */; }; + EA8D941771E762A5D3D7FA0D /* FileMediaEventsTimelineView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 430C73079A84654BF46A7FF5 /* FileMediaEventsTimelineView.swift */; }; EA974337FA7D040E7C74FE6E /* RoomDetailsViewModelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2EFE1922F39398ABFB36DF3F /* RoomDetailsViewModelTests.swift */; }; EAB3C1F0BC7F671ED8BDF82D /* CompletionSuggestionServiceProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9ECF11669EF253E98AA2977A /* CompletionSuggestionServiceProtocol.swift */; }; EAC6FE2CD4F50A43068ADCD8 /* SwiftState in Frameworks */ = {isa = PBXBuildFile; productRef = 9573B94B1C86C6DF751AF3FD /* SwiftState */; }; @@ -1185,6 +1187,7 @@ F669B55BC237CDA5EC9332FE /* MentionSuggestionItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4100DDE6BF3C566AB66B80CC /* MentionSuggestionItemView.swift */; }; F66BBBE51B258BBB0B918C68 /* MatrixRustSDK in Frameworks */ = {isa = PBXBuildFile; productRef = C79D91A7F9F378CECEF64B5A /* MatrixRustSDK */; }; F66BCCC825D6CA51724A94D0 /* MediaPlayerProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = E8A1F98AE670377B20679FF5 /* MediaPlayerProvider.swift */; }; + F6767F17D538578B370DD805 /* TimelineItemBubbleBackground.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE739A6836E86E3780748477 /* TimelineItemBubbleBackground.swift */; }; F697284B9B5F2C00CFEA3B12 /* EmojiDetectionTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A58E93D91DE3288010390DEE /* EmojiDetectionTests.swift */; }; F6BF52CB027393EE03CEC523 /* TimelineMediaPreviewViewModelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C1F000589F2CEE6B03ECFAB /* TimelineMediaPreviewViewModelTests.swift */; }; F6DFA23885980118AD7359C5 /* NotificationSettingsScreenCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2389732B0E115A999A069083 /* NotificationSettingsScreenCoordinator.swift */; }; @@ -1328,7 +1331,7 @@ 044E501B8331B339874D1B96 /* CompoundIcon.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CompoundIcon.swift; sourceTree = ""; }; 045253F9967A535EE5B16691 /* Label.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Label.swift; sourceTree = ""; }; 046C0D3F53B0B5EF0A1F5BEA /* RoomSummaryTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomSummaryTests.swift; sourceTree = ""; }; - 048A21188AB19349D026BECD /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = ""; }; + 048A21188AB19349D026BECD /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; path = PrivacyInfo.xcprivacy; sourceTree = ""; }; 04BB8DDE245ED86C489BA983 /* AccessibilityIdentifiers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccessibilityIdentifiers.swift; sourceTree = ""; }; 04DF593C3F7AF4B2FBAEB05D /* FileManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileManager.swift; sourceTree = ""; }; 0516C69708D5CBDE1A8E77EC /* RoomDirectorySearchProxyProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomDirectorySearchProxyProtocol.swift; sourceTree = ""; }; @@ -1396,7 +1399,7 @@ 127C8472672A5BA09EF1ACF8 /* CurrentValuePublisher.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CurrentValuePublisher.swift; sourceTree = ""; }; 128501375217576AF0FE3E92 /* RoomAttachmentPicker.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomAttachmentPicker.swift; sourceTree = ""; }; 12FD5280AF55AB7F50F8E47D /* preview_avatar_room.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = preview_avatar_room.jpg; sourceTree = ""; }; - 1304D9191300873EADA52D6E /* IntegrationTests.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = IntegrationTests.xctestplan; sourceTree = ""; }; + 1304D9191300873EADA52D6E /* IntegrationTests.xctestplan */ = {isa = PBXFileReference; path = IntegrationTests.xctestplan; sourceTree = ""; }; 130ED565A078F7E0B59D9D25 /* UNTextInputNotificationResponse+Creator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UNTextInputNotificationResponse+Creator.swift"; sourceTree = ""; }; 136F80A613B55BDD071DCEA5 /* JoinRoomScreenModels.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JoinRoomScreenModels.swift; sourceTree = ""; }; 13802897C7AFA360EA74C0B0 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = en; path = en.lproj/Localizable.stringsdict; sourceTree = ""; }; @@ -1418,7 +1421,6 @@ 17F7A723A46DF5C95BE15EBF /* clear.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = clear.png; sourceTree = ""; }; 18486B87745B1811E7FBD3D2 /* AnalyticsPromptScreenModels.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnalyticsPromptScreenModels.swift; sourceTree = ""; }; 184CF8C196BE143AE226628D /* DecorationTimelineItemProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DecorationTimelineItemProtocol.swift; sourceTree = ""; }; - 186CE9322D0AFD13001D37CB /* TimelineItemBubbleBackground.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimelineItemBubbleBackground.swift; sourceTree = ""; }; 18F2958E6D247AE2516BEEE8 /* ClientProxy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClientProxy.swift; sourceTree = ""; }; 18FE0CDF1FFA92EA7EE17B0B /* RoomTimelineControllerFactoryProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomTimelineControllerFactoryProtocol.swift; sourceTree = ""; }; 190EC7285D3CFEF0D3011BCF /* GeoURI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GeoURI.swift; sourceTree = ""; }; @@ -1499,7 +1501,7 @@ 25F7FE40EF7490A7E09D7BE6 /* NotificationItemProxy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationItemProxy.swift; sourceTree = ""; }; 25F8664F1FB95AF3C4202478 /* PollFormScreenCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PollFormScreenCoordinator.swift; sourceTree = ""; }; 260004737C573A56FA01E86E /* Encodable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Encodable.swift; sourceTree = ""; }; - 267BB1D5B08A9511F894CB57 /* PreviewTests.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = PreviewTests.xctestplan; sourceTree = ""; }; + 267BB1D5B08A9511F894CB57 /* PreviewTests.xctestplan */ = {isa = PBXFileReference; path = PreviewTests.xctestplan; sourceTree = ""; }; 26B0A96B8FE4849227945067 /* VoiceMessageRecorder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VoiceMessageRecorder.swift; sourceTree = ""; }; 26EAAB54C6CE91D64B69A9F8 /* AppLockServiceProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppLockServiceProtocol.swift; sourceTree = ""; }; 2721D7B051F0159AA919DA05 /* RoomChangePermissionsScreenViewModelProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomChangePermissionsScreenViewModelProtocol.swift; sourceTree = ""; }; @@ -1572,7 +1574,7 @@ 3558A15CFB934F9229301527 /* RestorationToken.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RestorationToken.swift; sourceTree = ""; }; 35AFCF4C05DEED04E3DB1A16 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Localizable.strings; sourceTree = ""; }; 35FA991289149D31F4286747 /* UserPreference.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserPreference.swift; sourceTree = ""; }; - 36DA824791172B9821EACBED /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = ""; }; + 36DA824791172B9821EACBED /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; path = PrivacyInfo.xcprivacy; sourceTree = ""; }; 36FD673E24FBFCFDF398716A /* RoomMemberProxyMock.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomMemberProxyMock.swift; sourceTree = ""; }; 376D941BF8BB294389C0DE24 /* MapTilerURLBuildersTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapTilerURLBuildersTests.swift; sourceTree = ""; }; 37A63A59BFDDC494B1C20119 /* CallScreenViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CallScreenViewModel.swift; sourceTree = ""; }; @@ -1632,6 +1634,7 @@ 42236480CF0431535EBE8387 /* CustomLayoutLabelStyle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomLayoutLabelStyle.swift; sourceTree = ""; }; 42C64A14EE89928207E3B42B /* AnalyticsSettingsScreenModels.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnalyticsSettingsScreenModels.swift; sourceTree = ""; }; 42C8C368A611B9CB79C7F5FA /* RoomPollsHistoryScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomPollsHistoryScreen.swift; sourceTree = ""; }; + 430C73079A84654BF46A7FF5 /* FileMediaEventsTimelineView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileMediaEventsTimelineView.swift; sourceTree = ""; }; 434522ED2BDED08759048077 /* fi */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fi; path = fi.lproj/Localizable.strings; sourceTree = ""; }; 436A0D98D372B17EAE9AA999 /* GlobalSearchScreenModels.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GlobalSearchScreenModels.swift; sourceTree = ""; }; 43A84EE187D0C772E18A4E39 /* VoiceMessageCacheProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VoiceMessageCacheProtocol.swift; sourceTree = ""; }; @@ -1686,7 +1689,7 @@ 4B41FABA2B0AEF4389986495 /* LoginMode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginMode.swift; sourceTree = ""; }; 4BD371B60E07A5324B9507EF /* AnalyticsSettingsScreenCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnalyticsSettingsScreenCoordinator.swift; sourceTree = ""; }; 4C8D988E82A8DFA13BE46F7C /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = pl; path = pl.lproj/Localizable.stringsdict; sourceTree = ""; }; - 4CD6AC7546E8D7E5C73CEA48 /* ElementX.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ElementX.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 4CD6AC7546E8D7E5C73CEA48 /* ElementX.app */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.application; path = ElementX.app; sourceTree = BUILT_PRODUCTS_DIR; }; 4CDDDDD9FE1A699D23A5E096 /* LoginScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginScreen.swift; sourceTree = ""; }; 4D3A7375AB22721C436EB056 /* ComposerToolbarModels.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ComposerToolbarModels.swift; sourceTree = ""; }; 4E2245243369B99216C7D84E /* ImageCache.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageCache.swift; sourceTree = ""; }; @@ -1914,6 +1917,7 @@ 82DFA1B7B088D033E0794B82 /* RoomChangeRolesScreenCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomChangeRolesScreenCoordinator.swift; sourceTree = ""; }; 82EE3B877D91030248B1242D /* DeactivateAccountScreenViewModelProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DeactivateAccountScreenViewModelProtocol.swift; sourceTree = ""; }; 8319173DD66C07F45DC48848 /* IdentityConfirmedScreenViewModelProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IdentityConfirmedScreenViewModelProtocol.swift; sourceTree = ""; }; + 832397B5C3D00A4BF52C5F0B /* ShouldScrollOnKeyboardDidShow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShouldScrollOnKeyboardDidShow.swift; sourceTree = ""; }; 837B440C4705E4B899BCB899 /* RoomDetailsScreenViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomDetailsScreenViewModel.swift; sourceTree = ""; }; 839E2C35DF3F9C7B54C3CE49 /* RoundedCornerShape.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoundedCornerShape.swift; sourceTree = ""; }; 83B4E3F1265581683E4997B8 /* RoomSelectionScreenViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomSelectionScreenViewModel.swift; sourceTree = ""; }; @@ -1968,7 +1972,7 @@ 8D55702474F279D910D2D162 /* RoomStateEventStringBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomStateEventStringBuilder.swift; sourceTree = ""; }; 8D8169443E5AC5FF71BFB3DB /* cs */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = cs; path = cs.lproj/Localizable.strings; sourceTree = ""; }; 8DA1E8F287680C8ED25EDBAC /* NetworkMonitorMock.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NetworkMonitorMock.swift; sourceTree = ""; }; - 8E088F2A1B9EC529D3221931 /* UITests.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = UITests.xctestplan; sourceTree = ""; }; + 8E088F2A1B9EC529D3221931 /* UITests.xctestplan */ = {isa = PBXFileReference; path = UITests.xctestplan; sourceTree = ""; }; 8E1584F8BCF407BB94F48F04 /* EncryptionResetPasswordScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EncryptionResetPasswordScreen.swift; sourceTree = ""; }; 8EAF4A49F3ACD8BB8B0D2371 /* ClientSDKMock.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClientSDKMock.swift; sourceTree = ""; }; 8F21ED7205048668BEB44A38 /* AppActivityView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppActivityView.swift; sourceTree = ""; }; @@ -2076,7 +2080,6 @@ A6C11AD9813045E44F950410 /* ElementCallWidgetDriverProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ElementCallWidgetDriverProtocol.swift; sourceTree = ""; }; A6EA0D8B0BBD8805F7D5A133 /* TextBasedRoomTimelineViewProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextBasedRoomTimelineViewProtocol.swift; sourceTree = ""; }; A73A07BAEDD74C48795A996A /* AsyncSequence.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AsyncSequence.swift; sourceTree = ""; }; - A77C2B332D09B954001A6024 /* ShouldScrollOnKeyboardDidShow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShouldScrollOnKeyboardDidShow.swift; sourceTree = ""; }; A7978C9EFBDD7DE39BD86726 /* RestorationTokenTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RestorationTokenTests.swift; sourceTree = ""; }; A7C4EA55DA62F9D0F984A2AE /* CollapsibleTimelineItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CollapsibleTimelineItem.swift; sourceTree = ""; }; A7D452AF7B5F7E3A0A7DB54C /* SessionVerificationScreenViewModelProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SessionVerificationScreenViewModelProtocol.swift; sourceTree = ""; }; @@ -2106,6 +2109,7 @@ ACA11F7F50A4A3887A18CA5A /* sv */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sv; path = sv.lproj/Localizable.strings; sourceTree = ""; }; ACD7BD6BEE21264F6677904A /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/InfoPlist.strings; sourceTree = ""; }; AD0FF64B0E6470F66F42E182 /* EstimatedWaveformView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EstimatedWaveformView.swift; sourceTree = ""; }; + AD3521DF92391551E02004D8 /* VoiceMessageMediaEventsTimelineView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VoiceMessageMediaEventsTimelineView.swift; sourceTree = ""; }; AD378D580A41E42560C60E9C /* sk */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sk; path = sk.lproj/Localizable.strings; sourceTree = ""; }; AD529C89924EE32CE307F36F /* VisualListItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VisualListItem.swift; sourceTree = ""; }; AD558A898847C179E4B7A237 /* SecureBackupKeyBackupScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SecureBackupKeyBackupScreen.swift; sourceTree = ""; }; @@ -2119,6 +2123,7 @@ AE40D4A5DD857AC16EED945A /* URLSession.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = URLSession.swift; sourceTree = ""; }; AE52983FAFB4E0998C00EE8A /* CancellableTask.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CancellableTask.swift; sourceTree = ""; }; AE5DDBEBBA17973ED4638823 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = de; path = de.lproj/Localizable.stringsdict; sourceTree = ""; }; + AE739A6836E86E3780748477 /* TimelineItemBubbleBackground.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimelineItemBubbleBackground.swift; sourceTree = ""; }; AEB5FF7A09B79B0C6B528F7C /* SFNumberedListView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SFNumberedListView.swift; sourceTree = ""; }; AEEAFB646E583655652C3D04 /* RoomStateEventStringBuilderTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomStateEventStringBuilderTests.swift; sourceTree = ""; }; AF25E364AE85090A70AE4644 /* AttributedStringBuilderTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AttributedStringBuilderTests.swift; sourceTree = ""; }; @@ -2152,7 +2157,7 @@ B50F03079F6B5EF9CA005F14 /* TimelineProxyProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimelineProxyProtocol.swift; sourceTree = ""; }; B53AC78E49A297AC1D72A7CF /* AppMediator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppMediator.swift; sourceTree = ""; }; B590BD4507D4F0A377FDE01A /* LoadableAvatarImage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadableAvatarImage.swift; sourceTree = ""; }; - B61C339A2FDDBD067FF6635C /* ConfettiScene.scn */ = {isa = PBXFileReference; lastKnownFileType = file.bplist; path = ConfettiScene.scn; sourceTree = ""; }; + B61C339A2FDDBD067FF6635C /* ConfettiScene.scn */ = {isa = PBXFileReference; path = ConfettiScene.scn; sourceTree = ""; }; B63B69F9A2BC74DD40DC75C8 /* AdvancedSettingsScreenViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdvancedSettingsScreenViewModel.swift; sourceTree = ""; }; B6404166CBF5CC88673FF9E2 /* RoomDetails.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomDetails.swift; sourceTree = ""; }; B655A536341D2695158C6664 /* AuthenticationClientBuilderFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AuthenticationClientBuilderFactory.swift; sourceTree = ""; }; @@ -2178,7 +2183,7 @@ BA40B98B098B6F0371B750B3 /* TemplateScreenModels.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TemplateScreenModels.swift; sourceTree = ""; }; BA919F521E9F0EE3638AFC85 /* BugReportScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BugReportScreen.swift; sourceTree = ""; }; BB284643AF7AB131E307DCE0 /* AudioSessionProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AudioSessionProtocol.swift; sourceTree = ""; }; - BB576F4118C35E6B5124FA22 /* test_apple_image.heic */ = {isa = PBXFileReference; lastKnownFileType = file; path = test_apple_image.heic; sourceTree = ""; }; + BB576F4118C35E6B5124FA22 /* test_apple_image.heic */ = {isa = PBXFileReference; path = test_apple_image.heic; sourceTree = ""; }; BB5B00A014307CE37B2812CD /* TimelineViewModelProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimelineViewModelProtocol.swift; sourceTree = ""; }; BB8BC4C791D0E88CFCF4E5DF /* ServerSelectionScreenCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ServerSelectionScreenCoordinator.swift; sourceTree = ""; }; BBEC57C204D77908E355EF42 /* AudioRecorderProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AudioRecorderProtocol.swift; sourceTree = ""; }; @@ -2275,7 +2280,7 @@ CDB3227C7A74B734924942E9 /* RoomSummaryProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomSummaryProvider.swift; sourceTree = ""; }; CDE3F3911FF7CC639BDE5844 /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = nl.lproj/Localizable.strings; sourceTree = ""; }; CEE20623EB4A9B88FB29F2BA /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/SAS.strings; sourceTree = ""; }; - CEE41494C837AA403A06A5D9 /* UnitTests.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = UnitTests.xctestplan; sourceTree = ""; }; + CEE41494C837AA403A06A5D9 /* UnitTests.xctestplan */ = {isa = PBXFileReference; path = UnitTests.xctestplan; sourceTree = ""; }; D01FD1171FF40E34D707FD00 /* BigIcon.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BigIcon.swift; sourceTree = ""; }; D071F86CD47582B9196C9D16 /* UserDiscoverySection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserDiscoverySection.swift; sourceTree = ""; }; D086854995173E897F993C26 /* AdvancedSettingsScreenViewModelProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdvancedSettingsScreenViewModelProtocol.swift; sourceTree = ""; }; @@ -2329,7 +2334,7 @@ DC0AEA686E425F86F6BA0404 /* UNNotification+Creator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UNNotification+Creator.swift"; sourceTree = ""; }; DC10CCC8D68B863E20660DBC /* MessageForwardingScreenViewModelProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessageForwardingScreenViewModelProtocol.swift; sourceTree = ""; }; DC528B3764E3CF7FCFEF40E7 /* PollInteractionHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PollInteractionHandler.swift; sourceTree = ""; }; - DCA2D836BD10303F37FAAEED /* test_voice_message.m4a */ = {isa = PBXFileReference; lastKnownFileType = file; path = test_voice_message.m4a; sourceTree = ""; }; + DCA2D836BD10303F37FAAEED /* test_voice_message.m4a */ = {isa = PBXFileReference; path = test_voice_message.m4a; sourceTree = ""; }; DCAC01A97A43BE07B9E94E43 /* ShareExtensionModels.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShareExtensionModels.swift; sourceTree = ""; }; DCF239C619971FDE48132550 /* SecureBackupLogoutConfirmationScreenModels.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SecureBackupLogoutConfirmationScreenModels.swift; sourceTree = ""; }; DD97F9661ABF08CE002054A2 /* AppLockServiceTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppLockServiceTests.swift; sourceTree = ""; }; @@ -2366,7 +2371,7 @@ E5272BC4A60B6AD7553BACA1 /* BlurHashDecode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BlurHashDecode.swift; sourceTree = ""; }; E53BFB7E4F329621C844E8C3 /* AnalyticsPromptScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnalyticsPromptScreen.swift; sourceTree = ""; }; E55B5EA766E89FF1F87C3ACB /* RoomNotificationSettingsProxyProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomNotificationSettingsProxyProtocol.swift; sourceTree = ""; }; - E5E7D4EE7CA295E5039FDA21 /* portrait_test_video.mp4 */ = {isa = PBXFileReference; lastKnownFileType = file; path = portrait_test_video.mp4; sourceTree = ""; }; + E5E7D4EE7CA295E5039FDA21 /* portrait_test_video.mp4 */ = {isa = PBXFileReference; path = portrait_test_video.mp4; sourceTree = ""; }; E5E94DCFEE803E5ABAE8ACCE /* KeychainControllerProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeychainControllerProtocol.swift; sourceTree = ""; }; E5F2B6443D1ED8602F328539 /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = ru; path = ru.lproj/Localizable.stringsdict; sourceTree = ""; }; E60757AFE04391B43EA568B8 /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = nl.lproj/InfoPlist.strings; sourceTree = ""; }; @@ -2408,7 +2413,7 @@ ED0CBEAB5F796BEFBAF7BB6A /* VideoRoomTimelineView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VideoRoomTimelineView.swift; sourceTree = ""; }; ED1D792EB82506A19A72C8DE /* RoomTimelineItemProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomTimelineItemProtocol.swift; sourceTree = ""; }; ED33988DA4FD4FC666800106 /* SessionVerificationScreenViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SessionVerificationScreenViewModel.swift; sourceTree = ""; }; - ED482057AE39D5C6D9C5F3D8 /* message.caf */ = {isa = PBXFileReference; lastKnownFileType = file; path = message.caf; sourceTree = ""; }; + ED482057AE39D5C6D9C5F3D8 /* message.caf */ = {isa = PBXFileReference; path = message.caf; sourceTree = ""; }; ED49073BB1C1FC649DAC2CCD /* LocationRoomTimelineView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocationRoomTimelineView.swift; sourceTree = ""; }; ED60E4D2CD678E1EBF16F77A /* BlockedUsersScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BlockedUsersScreen.swift; sourceTree = ""; }; EE378083653EF0C9B5E9D580 /* EmoteRoomTimelineItemContent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmoteRoomTimelineItemContent.swift; sourceTree = ""; }; @@ -2468,6 +2473,7 @@ FBC776F301D374A3298C69DA /* AppCoordinatorProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinatorProtocol.swift; sourceTree = ""; }; FC83F47D2173B7538AA72E0E /* RoomSummaryProviderMock.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomSummaryProviderMock.swift; sourceTree = ""; }; FC853F9B4FBE039D2C16EC6B /* RoomMembersListManageMemberSheet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomMembersListManageMemberSheet.swift; sourceTree = ""; }; + FC9044BE0E4A66F5B963E834 /* AudioFileEventsTimelineView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AudioFileEventsTimelineView.swift; sourceTree = ""; }; FCE93F0CBF0D96B77111C413 /* AppLockFlowCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppLockFlowCoordinator.swift; sourceTree = ""; }; FD1275D9CE0FFBA6E8E85426 /* UserIndicatorController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserIndicatorController.swift; sourceTree = ""; }; FDB9C37196A4C79F24CE80C6 /* KeychainControllerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeychainControllerTests.swift; sourceTree = ""; }; @@ -2641,8 +2647,8 @@ 052CC920F473C10B509F9FC1 /* SwiftUI */ = { isa = PBXGroup; children = ( - A77C2B332D09B954001A6024 /* ShouldScrollOnKeyboardDidShow.swift */, 693E16574C6F7F9FA1015A8C /* Search.swift */, + 832397B5C3D00A4BF52C5F0B /* ShouldScrollOnKeyboardDidShow.swift */, E2DA161C142B7AB8CC40F752 /* Animation */, CE2FBFD64A89F5DBE4EB30DB /* Layout */, E6E1D07163F8752D62DA4A93 /* Styles */, @@ -3103,11 +3109,11 @@ 2DA4F09CB613C54FDC73AE6A /* ThreadDecorator.swift */, F5D8FEB1FED10E995CB002F7 /* TimelineBubbleLayout.swift */, 1DA7E93C2E148B96EF6A8500 /* TimelineItemAccessibilityModifier.swift */, + AE739A6836E86E3780748477 /* TimelineItemBubbleBackground.swift */, 0A459AE4B6566B2FA99E86B2 /* TimelineItemBubbledStylerView.swift */, 753B4C6C0EDDCBF0708DC384 /* TimelineItemSendInfoLabel.swift */, 6CD4823EAB4B4E8BAB4F6B8C /* TimelineStyle.swift */, 2DB0E533508094156D8024C3 /* TimelineStyler.swift */, - 186CE9322D0AFD13001D37CB /* TimelineItemBubbleBackground.swift */, ); path = Style; sourceTree = ""; @@ -3680,9 +3686,12 @@ 50D53998001EC408A51D6509 /* TimelineViews */ = { isa = PBXGroup; children = ( + FC9044BE0E4A66F5B963E834 /* AudioFileEventsTimelineView.swift */, + 430C73079A84654BF46A7FF5 /* FileMediaEventsTimelineView.swift */, 1FF584D757E768EA7776A532 /* ImageMediaEventsTimelineView.swift */, 13F354AD441E2FD83DED89AF /* SeparatorMediaEventsTimelineView.swift */, 2B1FB56520A847DD2532D5C8 /* VideoMediaEventsTimelineView.swift */, + AD3521DF92391551E02004D8 /* VoiceMessageMediaEventsTimelineView.swift */, ); path = TimelineViews; sourceTree = ""; @@ -6729,6 +6738,7 @@ A6DEC1ADEC8FEEC206A0FA37 /* AttributedStringBuilderProtocol.swift in Sources */, 2DA27D78560D5F79B917E163 /* AudioConverter.swift in Sources */, F3F38062C6CA21CF403C5C90 /* AudioConverterProtocol.swift in Sources */, + 77E33FF0E4A50B555BF3A8AA /* AudioFileEventsTimelineView.swift in Sources */, 46C9F8FE3810A04A005FE16B /* AudioPlayer.swift in Sources */, 086D01E79C8E8D3F004FAF21 /* AudioPlayerProtocol.swift in Sources */, 1471A080552631358D152C18 /* AudioPlayerState.swift in Sources */, @@ -6894,8 +6904,8 @@ 2F09DF0CB213CAE86A3E3B67 /* EventTimelineItem.swift in Sources */, 63E46D18B91D08E15FC04125 /* ExpiringTaskRunner.swift in Sources */, 36206F74DDEBF9BEAF6A6A1F /* ExtensionLogger.swift in Sources */, - 186CE9332D0AFD13001D37CB /* TimelineItemBubbleBackground.swift in Sources */, 5F06AD3C66884CE793AE6119 /* FileManager.swift in Sources */, + EA8D941771E762A5D3D7FA0D /* FileMediaEventsTimelineView.swift in Sources */, D33AC79A50DFC26D2498DD28 /* FileRoomTimelineItem.swift in Sources */, 37D789F24199B32E3FD1AA7B /* FileRoomTimelineItemContent.swift in Sources */, 64EE9D2CF7AD02EE53983CE1 /* FileRoomTimelineView.swift in Sources */, @@ -6911,7 +6921,6 @@ 9F11E743EA01482E78A438B0 /* GlobalSearchScreenCell.swift in Sources */, 7D261B5119E78CC8E771CA15 /* GlobalSearchScreenCoordinator.swift in Sources */, D34E328E9E65904358248FDD /* GlobalSearchScreenModels.swift in Sources */, - A77C2B342D09B976001A6024 /* ShouldScrollOnKeyboardDidShow.swift in Sources */, 55D18AA4F4A2257642EBDB94 /* GlobalSearchScreenViewModel.swift in Sources */, E32A18802EB37EEE3EF7B965 /* GlobalSearchScreenViewModelProtocol.swift in Sources */, 0C1E537A49ABB386F7554D4A /* HighlightedTimelineItemModifier.swift in Sources */, @@ -7352,6 +7361,7 @@ 5D99F63CC88BB29383019FC6 /* ShareExtensionModels.swift in Sources */, 1C8BC70A18060677E295A846 /* ShareToMapsAppActivity.swift in Sources */, 274CE3C986841D15FD530BF5 /* ShimmerModifier.swift in Sources */, + 5038E69A5E6A89DE1A345E04 /* ShouldScrollOnKeyboardDidShow.swift in Sources */, 77920AFA8091AC6B9F190C90 /* Signposter.swift in Sources */, F08F7BC07CA9AEF5CD157918 /* Snapshotting.swift in Sources */, 8BC8EF6705A78946C1F22891 /* SoftLogoutScreen.swift in Sources */, @@ -7398,6 +7408,7 @@ 798BF3072137833FBD3F4C96 /* TimelineDeliveryStatusView.swift in Sources */, 109AEB7D33C4497727AFB87F /* TimelineInteractionHandler.swift in Sources */, E6FA87F773424B27614B23E9 /* TimelineItemAccessibilityModifier.swift in Sources */, + F6767F17D538578B370DD805 /* TimelineItemBubbleBackground.swift in Sources */, 79959F8E45C3749997482A7F /* TimelineItemBubbledStylerView.swift in Sources */, A808DC3F72D15C6C5A52317E /* TimelineItemDebugView.swift in Sources */, 877D3CE8680536DB430DE6A2 /* TimelineItemIdentifier.swift in Sources */, @@ -7496,6 +7507,7 @@ 1318721F4E5F307586D98112 /* VoiceMessageButton.swift in Sources */, 4681820102DAC8BA586357D4 /* VoiceMessageCache.swift in Sources */, 4F2DF6138E87A4B8C2488CA3 /* VoiceMessageCacheProtocol.swift in Sources */, + 4870F7F72CEBEFDAD1C973A6 /* VoiceMessageMediaEventsTimelineView.swift in Sources */, 386720B603F87D156DB01FB2 /* VoiceMessageMediaManager.swift in Sources */, 9DE801D278AC34737467F937 /* VoiceMessageMediaManagerProtocol.swift in Sources */, F7932A3F075B0D3F24DEECB5 /* VoiceMessagePreviewComposer.swift in Sources */, @@ -7757,7 +7769,9 @@ "@executable_path/../../Frameworks", ); MARKETING_VERSION = "$(MARKETING_VERSION)"; - OTHER_SWIFT_FLAGS = "-DIS_NSE"; + OTHER_SWIFT_FLAGS = ( + "-DIS_NSE", + ); PRODUCT_BUNDLE_IDENTIFIER = "${BASE_BUNDLE_IDENTIFIER}.nse"; PRODUCT_DISPLAY_NAME = "$(APP_DISPLAY_NAME)"; PRODUCT_NAME = NSE; @@ -7807,7 +7821,9 @@ "@executable_path/Frameworks", ); MARKETING_VERSION = "$(MARKETING_VERSION)"; - OTHER_SWIFT_FLAGS = "-DIS_MAIN_APP"; + OTHER_SWIFT_FLAGS = ( + "-DIS_MAIN_APP", + ); PILLS_UT_TYPE_IDENTIFIER = "$(BASE_BUNDLE_IDENTIFIER).pills"; PRODUCT_BUNDLE_IDENTIFIER = "$(BASE_BUNDLE_IDENTIFIER)"; PRODUCT_NAME = "$(APP_NAME)"; @@ -7834,7 +7850,9 @@ "@executable_path/Frameworks", ); MARKETING_VERSION = "$(MARKETING_VERSION)"; - OTHER_SWIFT_FLAGS = "-DIS_MAIN_APP"; + OTHER_SWIFT_FLAGS = ( + "-DIS_MAIN_APP", + ); PILLS_UT_TYPE_IDENTIFIER = "$(BASE_BUNDLE_IDENTIFIER).pills"; PRODUCT_BUNDLE_IDENTIFIER = "$(BASE_BUNDLE_IDENTIFIER)"; PRODUCT_NAME = "$(APP_NAME)"; @@ -8100,7 +8118,9 @@ "@executable_path/../../Frameworks", ); MARKETING_VERSION = "$(MARKETING_VERSION)"; - OTHER_SWIFT_FLAGS = "-DIS_NSE"; + OTHER_SWIFT_FLAGS = ( + "-DIS_NSE", + ); PRODUCT_BUNDLE_IDENTIFIER = "${BASE_BUNDLE_IDENTIFIER}.nse"; PRODUCT_DISPLAY_NAME = "$(APP_DISPLAY_NAME)"; PRODUCT_NAME = NSE; diff --git a/ElementX/Sources/Screens/MediaEventsTimelineScreen/View/MediaEventsTimelineScreen.swift b/ElementX/Sources/Screens/MediaEventsTimelineScreen/View/MediaEventsTimelineScreen.swift index 0df71168ea..6957df07b4 100644 --- a/ElementX/Sources/Screens/MediaEventsTimelineScreen/View/MediaEventsTimelineScreen.swift +++ b/ElementX/Sources/Screens/MediaEventsTimelineScreen/View/MediaEventsTimelineScreen.swift @@ -95,16 +95,17 @@ struct MediaEventsTimelineScreen: View { ForEach(context.viewState.groups) { group in Section { ForEach(group.items) { item in - viewForTimelineItem(item) - .scaleEffect(.init(width: 1, height: -1)) - .onTapGesture { + VStack(spacing: 20) { + Divider() + + Button { context.send(viewAction: .tappedItem(item)) + } label: { + viewForTimelineItem(item) + .scaleEffect(.init(width: 1, height: -1)) } - .accessibilityActions { - Button(L10n.actionShow) { - context.send(viewAction: .tappedItem(item)) - } - } + } + .padding(.horizontal, 16) } } footer: { // Use a footer as the header because the scrollView is flipped @@ -143,13 +144,13 @@ struct MediaEventsTimelineScreen: View { case .video(let timelineItem): VideoMediaEventsTimelineView(timelineItem: timelineItem) case .file(let timelineItem): - FileRoomTimelineView(timelineItem: timelineItem) + FileMediaEventsTimelineView(timelineItem: timelineItem) case .audio(let timelineItem): - AudioRoomTimelineView(timelineItem: timelineItem) + AudioMediaEventsTimelineView(timelineItem: timelineItem) case .voice(let timelineItem): let defaultPlayerState = AudioPlayerState(id: .timelineItemIdentifier(timelineItem.id), title: L10n.commonVoiceMessage, duration: 0) let playerState = context.viewState.activeTimelineContextProvider().viewState.audioPlayerStateProvider?(timelineItem.id) ?? defaultPlayerState - VoiceMessageRoomTimelineView(timelineItem: timelineItem, playerState: playerState) + VoiceMessageMediaEventsTimelineView(timelineItem: timelineItem, playerState: playerState) default: EmptyView() } diff --git a/ElementX/Sources/Screens/MediaEventsTimelineScreen/View/TimelineViews/AudioFileEventsTimelineView.swift b/ElementX/Sources/Screens/MediaEventsTimelineScreen/View/TimelineViews/AudioFileEventsTimelineView.swift new file mode 100644 index 0000000000..0327245f43 --- /dev/null +++ b/ElementX/Sources/Screens/MediaEventsTimelineScreen/View/TimelineViews/AudioFileEventsTimelineView.swift @@ -0,0 +1,61 @@ +// +// Copyright 2023, 2024 New Vector Ltd. +// +// SPDX-License-Identifier: AGPL-3.0-only +// Please see LICENSE in the repository root for full details. +// + +import Compound +import SwiftUI + +struct AudioMediaEventsTimelineView: View { + let timelineItem: AudioRoomTimelineItem + + var body: some View { + MediaFileRoomTimelineContent(timelineItemID: timelineItem.id, + filename: timelineItem.content.filename, + fileSize: timelineItem.content.fileSize, + caption: timelineItem.content.caption, + formattedCaption: timelineItem.content.formattedCaption, + additionalWhitespaces: timelineItem.additionalWhitespaces(), + isAudioFile: true) + .accessibilityLabel(L10n.commonAudio) + .frame(maxWidth: .infinity, alignment: .leading) + .bubbleBackground(timelineItem: timelineItem, + insets: .init(top: 8, leading: 12, bottom: 8, trailing: 12), + color: .compound.bgSubtleSecondary) + } +} + +struct AudioMediaEventsTimelineView_Previews: PreviewProvider, TestablePreview { + static let viewModel = TimelineViewModel.mock + + static var previews: some View { + VStack(spacing: 20) { + AudioMediaEventsTimelineView(timelineItem: makeItem(filename: "audio.ogg", + fileSize: 2 * 1024 * 1024)) + + AudioMediaEventsTimelineView(timelineItem: makeItem(filename: "Best Song Ever.mp3", + fileSize: 7 * 1024 * 1024, + caption: "This song rocks!")) + } + .environmentObject(viewModel.context) + } + + static func makeItem(filename: String, fileSize: UInt, caption: String? = nil) -> AudioRoomTimelineItem { + .init(id: .randomEvent, + timestamp: .mock, + isOutgoing: false, + isEditable: false, + canBeRepliedTo: true, + isThreaded: false, + sender: .init(id: "Bob"), + content: .init(filename: filename, + caption: caption, + duration: 300, + waveform: nil, + source: nil, + fileSize: fileSize, + contentType: nil)) + } +} diff --git a/ElementX/Sources/Screens/MediaEventsTimelineScreen/View/TimelineViews/FileMediaEventsTimelineView.swift b/ElementX/Sources/Screens/MediaEventsTimelineScreen/View/TimelineViews/FileMediaEventsTimelineView.swift new file mode 100644 index 0000000000..e742fe8363 --- /dev/null +++ b/ElementX/Sources/Screens/MediaEventsTimelineScreen/View/TimelineViews/FileMediaEventsTimelineView.swift @@ -0,0 +1,70 @@ +// +// Copyright 2022-2024 New Vector Ltd. +// +// SPDX-License-Identifier: AGPL-3.0-only +// Please see LICENSE in the repository root for full details. +// + +import Compound +import SwiftUI + +struct FileMediaEventsTimelineView: View { + let timelineItem: FileRoomTimelineItem + + var body: some View { + MediaFileRoomTimelineContent(timelineItemID: timelineItem.id, + filename: timelineItem.content.filename, + fileSize: timelineItem.content.fileSize, + caption: timelineItem.content.caption, + formattedCaption: timelineItem.content.formattedCaption, + additionalWhitespaces: timelineItem.additionalWhitespaces()) + .accessibilityLabel(L10n.commonFile) + .frame(maxWidth: .infinity, alignment: .leading) + .bubbleBackground(timelineItem: timelineItem, + insets: .init(top: 8, leading: 12, bottom: 8, trailing: 12), + color: .compound.bgSubtleSecondary) + } +} + +struct FileMediaEventsTimelineView_Previews: PreviewProvider, TestablePreview { + static let viewModel = TimelineViewModel.mock + + static var previews: some View { + VStack(spacing: 20.0) { + FileMediaEventsTimelineView(timelineItem: makeItem(filename: "document.pdf")) + + FileMediaEventsTimelineView(timelineItem: makeItem(filename: "document.pdf", + fileSize: 3 * 1024 * 1024)) + + FileMediaEventsTimelineView(timelineItem: makeItem(filename: "spreadsheet.xlsx", + fileSize: 17 * 1024, + caption: "The important figures you asked me to send over.")) + + FileMediaEventsTimelineView(timelineItem: makeItem(filename: "document.txt", + fileSize: 456, + caption: "Plain caption", + formattedCaption: "Formatted caption")) + } + .environmentObject(viewModel.context) + } + + static func makeItem(filename: String, + fileSize: UInt? = nil, + caption: String? = nil, + formattedCaption: AttributedString? = nil) -> FileRoomTimelineItem { + .init(id: .randomEvent, + timestamp: .mock, + isOutgoing: false, + isEditable: false, + canBeRepliedTo: true, + isThreaded: false, + sender: .init(id: "Bob"), + content: .init(filename: filename, + caption: caption, + formattedCaption: formattedCaption, + source: nil, + fileSize: fileSize, + thumbnailSource: nil, + contentType: nil)) + } +} diff --git a/ElementX/Sources/Screens/MediaEventsTimelineScreen/View/TimelineViews/VoiceMessageMediaEventsTimelineView.swift b/ElementX/Sources/Screens/MediaEventsTimelineScreen/View/TimelineViews/VoiceMessageMediaEventsTimelineView.swift new file mode 100644 index 0000000000..5987e1ac9b --- /dev/null +++ b/ElementX/Sources/Screens/MediaEventsTimelineScreen/View/TimelineViews/VoiceMessageMediaEventsTimelineView.swift @@ -0,0 +1,60 @@ +// +// Copyright 2023, 2024 New Vector Ltd. +// +// SPDX-License-Identifier: AGPL-3.0-only +// Please see LICENSE in the repository root for full details. +// + +import Compound +import SwiftUI + +struct VoiceMessageMediaEventsTimelineView: View { + let timelineItem: VoiceMessageRoomTimelineItem + let playerState: AudioPlayerState + + var body: some View { + VoiceMessageRoomTimelineContent(timelineItem: timelineItem, + playerState: playerState) + .accessibilityLabel(L10n.commonVoiceMessage) + .frame(maxWidth: .infinity, alignment: .leading) + .bubbleBackground(timelineItem: timelineItem, + insets: .init(top: 8, leading: 12, bottom: 8, trailing: 12), + color: .compound.bgSubtleSecondary) + } +} + +// MARK: - Content + +struct VoiceMessageMediaEventsTimelineView_Previews: PreviewProvider, TestablePreview { + static let viewModel = TimelineViewModel.mock + static let timelineItemIdentifier = TimelineItemIdentifier.randomEvent + static let voiceRoomTimelineItem = VoiceMessageRoomTimelineItem(id: timelineItemIdentifier, + timestamp: .mock, + isOutgoing: false, + isEditable: false, + canBeRepliedTo: true, + isThreaded: false, + sender: .init(id: "Bob"), + content: .init(filename: "audio.ogg", + duration: 300, + waveform: EstimatedWaveform.mockWaveform, + source: nil, + fileSize: nil, + contentType: nil)) + + static let playerState = AudioPlayerState(id: .timelineItemIdentifier(timelineItemIdentifier), + title: L10n.commonVoiceMessage, + duration: 10.0, + waveform: EstimatedWaveform.mockWaveform, + progress: 0.4) + + static var previews: some View { + body + .environmentObject(viewModel.context) + } + + static var body: some View { + VoiceMessageMediaEventsTimelineView(timelineItem: voiceRoomTimelineItem, playerState: playerState) + .fixedSize(horizontal: false, vertical: true) + } +} diff --git a/ElementX/Sources/Screens/Timeline/View/TimelineItemViews/VoiceMessageRoomTimelineView.swift b/ElementX/Sources/Screens/Timeline/View/TimelineItemViews/VoiceMessageRoomTimelineView.swift index 1a31da4414..c247fe1b46 100644 --- a/ElementX/Sources/Screens/Timeline/View/TimelineItemViews/VoiceMessageRoomTimelineView.swift +++ b/ElementX/Sources/Screens/Timeline/View/TimelineItemViews/VoiceMessageRoomTimelineView.swift @@ -9,25 +9,30 @@ import Foundation import SwiftUI struct VoiceMessageRoomTimelineView: View { + let timelineItem: VoiceMessageRoomTimelineItem + let playerState: AudioPlayerState + + var body: some View { + TimelineStyler(timelineItem: timelineItem) { + VoiceMessageRoomTimelineContent(timelineItem: timelineItem, + playerState: playerState) + } + } +} + +struct VoiceMessageRoomTimelineContent: View { @Environment(\.timelineContext) private var context - private let timelineItem: VoiceMessageRoomTimelineItem - private let playerState: AudioPlayerState @State private var resumePlaybackAfterScrubbing = false - init(timelineItem: VoiceMessageRoomTimelineItem, playerState: AudioPlayerState) { - self.timelineItem = timelineItem - self.playerState = playerState - } + let timelineItem: VoiceMessageRoomTimelineItem + let playerState: AudioPlayerState var body: some View { - TimelineStyler(timelineItem: timelineItem) { - VoiceMessageRoomPlaybackView(playerState: playerState, - onPlayPause: onPlaybackPlayPause, - onSeek: { onPlaybackSeek($0) }, - onScrubbing: { onPlaybackScrubbing($0) }) - .fixedSize(horizontal: false, vertical: true) - .frame(maxWidth: 400) - } + VoiceMessageRoomPlaybackView(playerState: playerState, + onPlayPause: onPlaybackPlayPause, + onSeek: { onPlaybackSeek($0) }, + onScrubbing: { onPlaybackScrubbing($0) }) + .fixedSize(horizontal: false, vertical: true) } private func onPlaybackPlayPause() { diff --git a/PreviewTests/Sources/GeneratedPreviewTests.swift b/PreviewTests/Sources/GeneratedPreviewTests.swift index 048c6e2c17..4dc11560a7 100644 --- a/PreviewTests/Sources/GeneratedPreviewTests.swift +++ b/PreviewTests/Sources/GeneratedPreviewTests.swift @@ -53,6 +53,12 @@ extension PreviewTests { } } + func test_audioMediaEventsTimelineView() { + for preview in AudioMediaEventsTimelineView_Previews._allPreviews { + assertSnapshots(matching: preview) + } + } + func test_audioRoomTimelineView() { for preview in AudioRoomTimelineView_Previews._allPreviews { assertSnapshots(matching: preview) @@ -179,6 +185,12 @@ extension PreviewTests { } } + func test_fileMediaEventsTimelineView() { + for preview in FileMediaEventsTimelineView_Previews._allPreviews { + assertSnapshots(matching: preview) + } + } + func test_fileRoomTimelineView() { for preview in FileRoomTimelineView_Previews._allPreviews { assertSnapshots(matching: preview) @@ -1031,6 +1043,12 @@ extension PreviewTests { } } + func test_voiceMessageMediaEventsTimelineView() { + for preview in VoiceMessageMediaEventsTimelineView_Previews._allPreviews { + assertSnapshots(matching: preview) + } + } + func test_voiceMessagePreviewComposer() { for preview in VoiceMessagePreviewComposer_Previews._allPreviews { assertSnapshots(matching: preview) diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_audioMediaEventsTimelineView-iPad-en-GB.1.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_audioMediaEventsTimelineView-iPad-en-GB.1.png new file mode 100644 index 0000000000..2c18ea9941 --- /dev/null +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_audioMediaEventsTimelineView-iPad-en-GB.1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8e0cde871c15aa0fadf7c4f36f1e8efaaf1b6e4b183745970521c7e0682cc7ae +size 91919 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_audioMediaEventsTimelineView-iPad-pseudo.1.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_audioMediaEventsTimelineView-iPad-pseudo.1.png new file mode 100644 index 0000000000..c180bb1ec4 --- /dev/null +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_audioMediaEventsTimelineView-iPad-pseudo.1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ea99daf61180bf74a70fdfcdcf78f775cafbcf06034ef5cd35f887c7ebd09c92 +size 94531 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_audioMediaEventsTimelineView-iPhone-16-en-GB.1.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_audioMediaEventsTimelineView-iPhone-16-en-GB.1.png new file mode 100644 index 0000000000..95842019ce --- /dev/null +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_audioMediaEventsTimelineView-iPhone-16-en-GB.1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:462fbf7b26d76217a9045ba76a97c5172c63817383caf15e7a82e1db89a36d2f +size 48610 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_audioMediaEventsTimelineView-iPhone-16-pseudo.1.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_audioMediaEventsTimelineView-iPhone-16-pseudo.1.png new file mode 100644 index 0000000000..a2009a3efe --- /dev/null +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_audioMediaEventsTimelineView-iPhone-16-pseudo.1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fb2174ebc097d4670f75b14e90074fe5477d9ae364dc40f520e8e3d51f316cd4 +size 50374 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_fileMediaEventsTimelineView-iPad-en-GB.1.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_fileMediaEventsTimelineView-iPad-en-GB.1.png new file mode 100644 index 0000000000..57a17c8732 --- /dev/null +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_fileMediaEventsTimelineView-iPad-en-GB.1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7e72e9a0f59a3b8967f7457cdbb2c11214f0793ea89807e3894a316c51b8cdf7 +size 120661 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_fileMediaEventsTimelineView-iPad-pseudo.1.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_fileMediaEventsTimelineView-iPad-pseudo.1.png new file mode 100644 index 0000000000..bf9d9204b1 --- /dev/null +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_fileMediaEventsTimelineView-iPad-pseudo.1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ddbef7603abfb93c1edd1c78cd3f8d9a6f8f484fca89d92abb8d3d424c185f87 +size 124318 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_fileMediaEventsTimelineView-iPhone-16-en-GB.1.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_fileMediaEventsTimelineView-iPhone-16-en-GB.1.png new file mode 100644 index 0000000000..ba57b7176a --- /dev/null +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_fileMediaEventsTimelineView-iPhone-16-en-GB.1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e737333650f3f467d240e4a7e709fe38ed74f2370a08e54d2286a4b20339499f +size 72725 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_fileMediaEventsTimelineView-iPhone-16-pseudo.1.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_fileMediaEventsTimelineView-iPhone-16-pseudo.1.png new file mode 100644 index 0000000000..a5d4ce7046 --- /dev/null +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_fileMediaEventsTimelineView-iPhone-16-pseudo.1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0ea15196e740ba28f3818f83a778d9992dacb10b9a9959c0f5edad69121c9212 +size 76629 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_mediaEventsTimelineScreen-iPad-en-GB.Files.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_mediaEventsTimelineScreen-iPad-en-GB.Files.png index d751f5bf47..c1efc8f588 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_mediaEventsTimelineScreen-iPad-en-GB.Files.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_mediaEventsTimelineScreen-iPad-en-GB.Files.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1efe8d7219056e410fdb3a3ca386198526a91e096c9ae4c80f7e38947f6d29d2 -size 169520 +oid sha256:51741b607cd001a1a7e8ce7ec03cdcbd35bc294a9b9bb76e05469561542a38f4 +size 146263 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_mediaEventsTimelineScreen-iPad-pseudo.Files.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_mediaEventsTimelineScreen-iPad-pseudo.Files.png index 123a798deb..b29218930f 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_mediaEventsTimelineScreen-iPad-pseudo.Files.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_mediaEventsTimelineScreen-iPad-pseudo.Files.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5746225afcd33ffd7a2f0a8beb05e31e005dcfd0ded7cde8398b180c77dbb8a5 -size 178967 +oid sha256:63987ffb9a91d412c7bc6dc813230d21223ae5b91781daede3acbf624ba4f752 +size 148838 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_mediaEventsTimelineScreen-iPhone-16-en-GB.Files.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_mediaEventsTimelineScreen-iPhone-16-en-GB.Files.png index 92588a9076..394b23c22f 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_mediaEventsTimelineScreen-iPhone-16-en-GB.Files.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_mediaEventsTimelineScreen-iPhone-16-en-GB.Files.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7109b26c659e7525c559bf8336127c84464f079b47f51f68e343e7e77eeb2947 -size 114655 +oid sha256:cfce1624b822fabe439d77f47fcedfbaab78b4b9f5dc20518c47d315f097dcd4 +size 87008 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_mediaEventsTimelineScreen-iPhone-16-pseudo.Files.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_mediaEventsTimelineScreen-iPhone-16-pseudo.Files.png index 28a941e36e..3f02404cec 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_mediaEventsTimelineScreen-iPhone-16-pseudo.Files.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_mediaEventsTimelineScreen-iPhone-16-pseudo.Files.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4512d75693b003d50ae96a549a5d896bb26ab80435c9e4dc80650ef33e61a294 -size 120654 +oid sha256:fa188dd55c8b9cdd46318ab24209a8458a61abe11b9c52fc05086724c4b7fb1d +size 88770 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_voiceMessageMediaEventsTimelineView-iPad-en-GB.1.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_voiceMessageMediaEventsTimelineView-iPad-en-GB.1.png new file mode 100644 index 0000000000..f63a1bb2ba --- /dev/null +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_voiceMessageMediaEventsTimelineView-iPad-en-GB.1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:16c155fc0209dad7f822280f935baf1b7558ca92a96316a43221fbb6e7209854 +size 74031 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_voiceMessageMediaEventsTimelineView-iPad-pseudo.1.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_voiceMessageMediaEventsTimelineView-iPad-pseudo.1.png new file mode 100644 index 0000000000..f63a1bb2ba --- /dev/null +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_voiceMessageMediaEventsTimelineView-iPad-pseudo.1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:16c155fc0209dad7f822280f935baf1b7558ca92a96316a43221fbb6e7209854 +size 74031 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_voiceMessageMediaEventsTimelineView-iPhone-16-en-GB.1.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_voiceMessageMediaEventsTimelineView-iPhone-16-en-GB.1.png new file mode 100644 index 0000000000..03c3910f3e --- /dev/null +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_voiceMessageMediaEventsTimelineView-iPhone-16-en-GB.1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:67319c74089339e445ea194e10db087268c7c1d6b2832877f2ad698803e56875 +size 32851 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_voiceMessageMediaEventsTimelineView-iPhone-16-pseudo.1.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_voiceMessageMediaEventsTimelineView-iPhone-16-pseudo.1.png new file mode 100644 index 0000000000..03c3910f3e --- /dev/null +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_voiceMessageMediaEventsTimelineView-iPhone-16-pseudo.1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:67319c74089339e445ea194e10db087268c7c1d6b2832877f2ad698803e56875 +size 32851 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_voiceMessageRoomTimelineView-iPad-en-GB.Bubble.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_voiceMessageRoomTimelineView-iPad-en-GB.Bubble.png index 36228f2655..53a695bc6d 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_voiceMessageRoomTimelineView-iPad-en-GB.Bubble.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_voiceMessageRoomTimelineView-iPad-en-GB.Bubble.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f518c5ce36c085ec697501297d0303044042b8df1341fcf0d02b08b3eef58959 -size 77812 +oid sha256:3f4f1266f8f571fb61056f8c58d75f8dbb9653b916168b7ff08e457c9f55b562 +size 78247 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_voiceMessageRoomTimelineView-iPad-pseudo.Bubble.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_voiceMessageRoomTimelineView-iPad-pseudo.Bubble.png index 9439295081..8e54f887bb 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_voiceMessageRoomTimelineView-iPad-pseudo.Bubble.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_voiceMessageRoomTimelineView-iPad-pseudo.Bubble.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3d456a81d249a01c6817c0bb35bf2a501ca641918009533c3a8dbb9db2739456 -size 78571 +oid sha256:5be910490972939e7dc064fa8bbcfc2ba9f3c50d2183836a66ef887eb7bd59b1 +size 79781 From 23845ac5292ff5ef5ce013c0ed215d297d2df644 Mon Sep 17 00:00:00 2001 From: Stefan Ceriu Date: Thu, 12 Dec 2024 16:40:16 +0200 Subject: [PATCH 3/3] Add back max voice message width and add missing accessibility label --- .../View/TimelineItemViews/VoiceMessageRoomTimelineView.swift | 3 ++- .../test_voiceMessageRoomTimelineView-iPad-en-GB.1.png | 3 +++ .../test_voiceMessageRoomTimelineView-iPad-pseudo.1.png | 3 +++ ...=> test_voiceMessageRoomTimelineView-iPhone-16-en-GB.1.png} | 0 ...> test_voiceMessageRoomTimelineView-iPhone-16-pseudo.1.png} | 0 5 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 PreviewTests/Sources/__Snapshots__/PreviewTests/test_voiceMessageRoomTimelineView-iPad-en-GB.1.png create mode 100644 PreviewTests/Sources/__Snapshots__/PreviewTests/test_voiceMessageRoomTimelineView-iPad-pseudo.1.png rename PreviewTests/Sources/__Snapshots__/PreviewTests/{test_voiceMessageRoomTimelineView-iPhone-16-en-GB.Bubble.png => test_voiceMessageRoomTimelineView-iPhone-16-en-GB.1.png} (100%) rename PreviewTests/Sources/__Snapshots__/PreviewTests/{test_voiceMessageRoomTimelineView-iPhone-16-pseudo.Bubble.png => test_voiceMessageRoomTimelineView-iPhone-16-pseudo.1.png} (100%) diff --git a/ElementX/Sources/Screens/Timeline/View/TimelineItemViews/VoiceMessageRoomTimelineView.swift b/ElementX/Sources/Screens/Timeline/View/TimelineItemViews/VoiceMessageRoomTimelineView.swift index c247fe1b46..6a8eb44a21 100644 --- a/ElementX/Sources/Screens/Timeline/View/TimelineItemViews/VoiceMessageRoomTimelineView.swift +++ b/ElementX/Sources/Screens/Timeline/View/TimelineItemViews/VoiceMessageRoomTimelineView.swift @@ -16,6 +16,8 @@ struct VoiceMessageRoomTimelineView: View { TimelineStyler(timelineItem: timelineItem) { VoiceMessageRoomTimelineContent(timelineItem: timelineItem, playerState: playerState) + .accessibilityLabel(L10n.commonVoiceMessage) + .frame(maxWidth: 400) } } } @@ -83,7 +85,6 @@ struct VoiceMessageRoomTimelineView_Previews: PreviewProvider, TestablePreview { static var previews: some View { body.environmentObject(viewModel.context) - .previewDisplayName("Bubble") } static var body: some View { diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_voiceMessageRoomTimelineView-iPad-en-GB.1.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_voiceMessageRoomTimelineView-iPad-en-GB.1.png new file mode 100644 index 0000000000..36228f2655 --- /dev/null +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_voiceMessageRoomTimelineView-iPad-en-GB.1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f518c5ce36c085ec697501297d0303044042b8df1341fcf0d02b08b3eef58959 +size 77812 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_voiceMessageRoomTimelineView-iPad-pseudo.1.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_voiceMessageRoomTimelineView-iPad-pseudo.1.png new file mode 100644 index 0000000000..9439295081 --- /dev/null +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_voiceMessageRoomTimelineView-iPad-pseudo.1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3d456a81d249a01c6817c0bb35bf2a501ca641918009533c3a8dbb9db2739456 +size 78571 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_voiceMessageRoomTimelineView-iPhone-16-en-GB.Bubble.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_voiceMessageRoomTimelineView-iPhone-16-en-GB.1.png similarity index 100% rename from PreviewTests/Sources/__Snapshots__/PreviewTests/test_voiceMessageRoomTimelineView-iPhone-16-en-GB.Bubble.png rename to PreviewTests/Sources/__Snapshots__/PreviewTests/test_voiceMessageRoomTimelineView-iPhone-16-en-GB.1.png diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_voiceMessageRoomTimelineView-iPhone-16-pseudo.Bubble.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_voiceMessageRoomTimelineView-iPhone-16-pseudo.1.png similarity index 100% rename from PreviewTests/Sources/__Snapshots__/PreviewTests/test_voiceMessageRoomTimelineView-iPhone-16-pseudo.Bubble.png rename to PreviewTests/Sources/__Snapshots__/PreviewTests/test_voiceMessageRoomTimelineView-iPhone-16-pseudo.1.png