mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 12:07:55 +00:00
Remove unused room details hook support (#6325)
* Remove unused room details hook support Signed-off-by: Daniel Anderson <daniel.anderson@toptal.com> * Update the Enterprise submodule.
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,7 +40,6 @@ struct DMRecipientInfo {
|
||||
}
|
||||
|
||||
struct RoomDetailsScreenViewState: BindableState {
|
||||
let appHooks: AppHooks
|
||||
var details: RoomDetails
|
||||
|
||||
var isEncrypted: Bool
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -20,10 +20,6 @@ struct RoomDetailsScreen: View {
|
||||
|
||||
topicSection
|
||||
|
||||
context.viewState.appHooks
|
||||
.roomDetailsScreenHook
|
||||
.additionalSections()
|
||||
|
||||
aboutSection
|
||||
|
||||
// The invitation flow is different for DMs
|
||||
|
||||
+1
-1
Submodule Enterprise updated: 191c56f2bb...38e089a531
Reference in New Issue
Block a user