From ae9e0cc176586cdaff616a2fd21d7a84fc6db58d Mon Sep 17 00:00:00 2001 From: Danny Date: Tue, 13 Oct 2026 10:19:45 -0600 Subject: [PATCH] Remove unused room details hook support (#6325) * Remove unused room details hook support Signed-off-by: Daniel Anderson * Update the Enterprise submodule. --- .../Sources/AppHooks/Hooks/RoomDetailsScreenHook.swift | 7 +------ .../RoomDetailsScreen/RoomDetailsScreenModels.swift | 1 - .../RoomDetailsScreen/RoomDetailsScreenViewModel.swift | 3 +-- .../Screens/RoomDetailsScreen/View/RoomDetailsScreen.swift | 4 ---- Enterprise | 2 +- 5 files changed, 3 insertions(+), 14 deletions(-) diff --git a/ElementX/Sources/AppHooks/Hooks/RoomDetailsScreenHook.swift b/ElementX/Sources/AppHooks/Hooks/RoomDetailsScreenHook.swift index a83aa44bd..8f9feb959 100644 --- a/ElementX/Sources/AppHooks/Hooks/RoomDetailsScreenHook.swift +++ b/ElementX/Sources/AppHooks/Hooks/RoomDetailsScreenHook.swift @@ -5,19 +5,14 @@ // Please see LICENSE files in the repository root for full details. // -import SwiftUI +import Foundation 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/Screens/RoomDetailsScreen/RoomDetailsScreenModels.swift b/ElementX/Sources/Screens/RoomDetailsScreen/RoomDetailsScreenModels.swift index 58312700c..e77b52b88 100644 --- a/ElementX/Sources/Screens/RoomDetailsScreen/RoomDetailsScreenModels.swift +++ b/ElementX/Sources/Screens/RoomDetailsScreen/RoomDetailsScreenModels.swift @@ -40,7 +40,6 @@ 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 737bfa1e4..51dc60627 100644 --- a/ElementX/Sources/Screens/RoomDetailsScreen/RoomDetailsScreenViewModel.swift +++ b/ElementX/Sources/Screens/RoomDetailsScreen/RoomDetailsScreenViewModel.swift @@ -59,8 +59,7 @@ class RoomDetailsScreenViewModel: RoomDetailsScreenViewModelType, RoomDetailsScr let topic = attributedStringBuilder.fromPlain(roomProxy.infoPublisher.value.topic) - let viewState = RoomDetailsScreenViewState(appHooks: appHooks, - details: roomProxy.details, + let viewState = RoomDetailsScreenViewState(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 deab8f0ef..ec8529e8e 100644 --- a/ElementX/Sources/Screens/RoomDetailsScreen/View/RoomDetailsScreen.swift +++ b/ElementX/Sources/Screens/RoomDetailsScreen/View/RoomDetailsScreen.swift @@ -20,10 +20,6 @@ struct RoomDetailsScreen: View { topicSection - context.viewState.appHooks - .roomDetailsScreenHook - .additionalSections() - aboutSection // The invitation flow is different for DMs diff --git a/Enterprise b/Enterprise index 191c56f2b..38e089a53 160000 --- a/Enterprise +++ b/Enterprise @@ -1 +1 @@ -Subproject commit 191c56f2bb31d04b92d66b81c7db750a9accf5dc +Subproject commit 38e089a531e8e733ad00bdc7d595a45c2ee87682