diff --git a/ElementX/Resources/Localizations/en-US.lproj/Localizable.strings b/ElementX/Resources/Localizations/en-US.lproj/Localizable.strings index 1b341c595..17a12d58a 100644 --- a/ElementX/Resources/Localizations/en-US.lproj/Localizable.strings +++ b/ElementX/Resources/Localizations/en-US.lproj/Localizable.strings @@ -1322,6 +1322,9 @@ "screen_room_details_profile_row_title" = "Profile"; "screen_room_details_requests_to_join_title" = "Requests to join"; "screen_room_details_roles_and_permissions" = "Roles & permissions"; +"screen_room_details_room_audio_ptt" = "Push to talk"; +"screen_room_details_room_audio_title" = "Room Audio"; +"screen_room_details_room_audio_video_calls" = "Video calls"; "screen_room_details_room_name_label" = "Name"; "screen_room_details_security_and_privacy_title" = "Security & privacy"; "screen_room_details_security_title" = "Security"; diff --git a/ElementX/Resources/Localizations/en.lproj/Localizable.strings b/ElementX/Resources/Localizations/en.lproj/Localizable.strings index 228fbb46f..1d638d8a0 100644 --- a/ElementX/Resources/Localizations/en.lproj/Localizable.strings +++ b/ElementX/Resources/Localizations/en.lproj/Localizable.strings @@ -1322,6 +1322,9 @@ "screen_room_details_profile_row_title" = "Profile"; "screen_room_details_requests_to_join_title" = "Requests to join"; "screen_room_details_roles_and_permissions" = "Roles & permissions"; +"screen_room_details_room_audio_ptt" = "Push to talk"; +"screen_room_details_room_audio_title" = "Room Audio"; +"screen_room_details_room_audio_video_calls" = "Video calls"; "screen_room_details_room_name_label" = "Name"; "screen_room_details_security_and_privacy_title" = "Security & privacy"; "screen_room_details_security_title" = "Security"; diff --git a/ElementX/Sources/AppHooks/Hooks/RoomDetailsScreenHook.swift b/ElementX/Sources/AppHooks/Hooks/RoomDetailsScreenHook.swift index 8f9feb959..a83aa44bd 100644 --- a/ElementX/Sources/AppHooks/Hooks/RoomDetailsScreenHook.swift +++ b/ElementX/Sources/AppHooks/Hooks/RoomDetailsScreenHook.swift @@ -5,14 +5,19 @@ // Please see LICENSE files in the repository root for full details. // -import Foundation +import SwiftUI nonisolated protocol RoomDetailsScreenHookProtocol: Sendable { @MainActor func update(_ viewState: RoomDetailsScreenViewState) -> RoomDetailsScreenViewState + @MainActor func additionalSections() -> AnyView? } struct DefaultRoomDetailsScreenHook: RoomDetailsScreenHookProtocol { func update(_ viewState: RoomDetailsScreenViewState) -> RoomDetailsScreenViewState { viewState } + + func additionalSections() -> AnyView? { + nil + } } diff --git a/ElementX/Sources/Generated/Strings.swift b/ElementX/Sources/Generated/Strings.swift index 8b41b1b6c..0f771f1bf 100644 --- a/ElementX/Sources/Generated/Strings.swift +++ b/ElementX/Sources/Generated/Strings.swift @@ -3062,6 +3062,12 @@ internal nonisolated enum L10n { internal static var screenRoomDetailsRequestsToJoinTitle: String { return L10n.tr("Localizable", "screen_room_details_requests_to_join_title") } /// Roles & permissions internal static var screenRoomDetailsRolesAndPermissions: String { return L10n.tr("Localizable", "screen_room_details_roles_and_permissions") } + /// Push to talk + internal static var screenRoomDetailsRoomAudioPtt: String { return L10n.tr("Localizable", "screen_room_details_room_audio_ptt") } + /// Room Audio + internal static var screenRoomDetailsRoomAudioTitle: String { return L10n.tr("Localizable", "screen_room_details_room_audio_title") } + /// Video calls + internal static var screenRoomDetailsRoomAudioVideoCalls: String { return L10n.tr("Localizable", "screen_room_details_room_audio_video_calls") } /// Name internal static var screenRoomDetailsRoomNameLabel: String { return L10n.tr("Localizable", "screen_room_details_room_name_label") } /// Security & privacy diff --git a/ElementX/Sources/Screens/RoomDetailsScreen/RoomDetailsScreenModels.swift b/ElementX/Sources/Screens/RoomDetailsScreen/RoomDetailsScreenModels.swift index e77b52b88..58312700c 100644 --- a/ElementX/Sources/Screens/RoomDetailsScreen/RoomDetailsScreenModels.swift +++ b/ElementX/Sources/Screens/RoomDetailsScreen/RoomDetailsScreenModels.swift @@ -40,6 +40,7 @@ struct DMRecipientInfo { } struct RoomDetailsScreenViewState: BindableState { + let appHooks: AppHooks var details: RoomDetails var isEncrypted: Bool diff --git a/ElementX/Sources/Screens/RoomDetailsScreen/RoomDetailsScreenViewModel.swift b/ElementX/Sources/Screens/RoomDetailsScreen/RoomDetailsScreenViewModel.swift index 31b7e34cd..7bcb08e06 100644 --- a/ElementX/Sources/Screens/RoomDetailsScreen/RoomDetailsScreenViewModel.swift +++ b/ElementX/Sources/Screens/RoomDetailsScreen/RoomDetailsScreenViewModel.swift @@ -60,7 +60,8 @@ class RoomDetailsScreenViewModel: RoomDetailsScreenViewModelType, RoomDetailsScr let topic = attributedStringBuilder.fromPlain(roomProxy.infoPublisher.value.topic) - let viewState = RoomDetailsScreenViewState(details: roomProxy.details, + let viewState = RoomDetailsScreenViewState(appHooks: appHooks, + details: roomProxy.details, isEncrypted: roomProxy.infoPublisher.value.isEncrypted, isDirect: roomProxy.infoPublisher.value.isDirect, topic: topic, diff --git a/ElementX/Sources/Screens/RoomDetailsScreen/View/RoomDetailsScreen.swift b/ElementX/Sources/Screens/RoomDetailsScreen/View/RoomDetailsScreen.swift index 8d723988f..afbe48c22 100644 --- a/ElementX/Sources/Screens/RoomDetailsScreen/View/RoomDetailsScreen.swift +++ b/ElementX/Sources/Screens/RoomDetailsScreen/View/RoomDetailsScreen.swift @@ -20,6 +20,10 @@ struct RoomDetailsScreen: View { topicSection + context.viewState.appHooks + .roomDetailsScreenHook + .additionalSections() + aboutSection // The invitation flow is different for DMs diff --git a/Enterprise b/Enterprise index ceb068874..44949031c 160000 --- a/Enterprise +++ b/Enterprise @@ -1 +1 @@ -Subproject commit ceb068874e2d527f74f8f42d962986ecbde484de +Subproject commit 44949031c7dfcb6ba0c9ad0f690fe824a280cc0a