mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +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.
|
// Please see LICENSE files in the repository root for full details.
|
||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
import Foundation
|
||||||
|
|
||||||
nonisolated protocol RoomDetailsScreenHookProtocol: Sendable {
|
nonisolated protocol RoomDetailsScreenHookProtocol: Sendable {
|
||||||
@MainActor func update(_ viewState: RoomDetailsScreenViewState) -> RoomDetailsScreenViewState
|
@MainActor func update(_ viewState: RoomDetailsScreenViewState) -> RoomDetailsScreenViewState
|
||||||
@MainActor func additionalSections() -> AnyView?
|
|
||||||
}
|
}
|
||||||
|
|
||||||
struct DefaultRoomDetailsScreenHook: RoomDetailsScreenHookProtocol {
|
struct DefaultRoomDetailsScreenHook: RoomDetailsScreenHookProtocol {
|
||||||
func update(_ viewState: RoomDetailsScreenViewState) -> RoomDetailsScreenViewState {
|
func update(_ viewState: RoomDetailsScreenViewState) -> RoomDetailsScreenViewState {
|
||||||
viewState
|
viewState
|
||||||
}
|
}
|
||||||
|
|
||||||
func additionalSections() -> AnyView? {
|
|
||||||
nil
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,7 +40,6 @@ struct DMRecipientInfo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
struct RoomDetailsScreenViewState: BindableState {
|
struct RoomDetailsScreenViewState: BindableState {
|
||||||
let appHooks: AppHooks
|
|
||||||
var details: RoomDetails
|
var details: RoomDetails
|
||||||
|
|
||||||
var isEncrypted: Bool
|
var isEncrypted: Bool
|
||||||
|
|||||||
@@ -59,8 +59,7 @@ class RoomDetailsScreenViewModel: RoomDetailsScreenViewModelType, RoomDetailsScr
|
|||||||
|
|
||||||
let topic = attributedStringBuilder.fromPlain(roomProxy.infoPublisher.value.topic)
|
let topic = attributedStringBuilder.fromPlain(roomProxy.infoPublisher.value.topic)
|
||||||
|
|
||||||
let viewState = RoomDetailsScreenViewState(appHooks: appHooks,
|
let viewState = RoomDetailsScreenViewState(details: roomProxy.details,
|
||||||
details: roomProxy.details,
|
|
||||||
isEncrypted: roomProxy.infoPublisher.value.isEncrypted,
|
isEncrypted: roomProxy.infoPublisher.value.isEncrypted,
|
||||||
isDirect: roomProxy.infoPublisher.value.isDirect,
|
isDirect: roomProxy.infoPublisher.value.isDirect,
|
||||||
topic: topic,
|
topic: topic,
|
||||||
|
|||||||
@@ -20,10 +20,6 @@ struct RoomDetailsScreen: View {
|
|||||||
|
|
||||||
topicSection
|
topicSection
|
||||||
|
|
||||||
context.viewState.appHooks
|
|
||||||
.roomDetailsScreenHook
|
|
||||||
.additionalSections()
|
|
||||||
|
|
||||||
aboutSection
|
aboutSection
|
||||||
|
|
||||||
// The invitation flow is different for DMs
|
// The invitation flow is different for DMs
|
||||||
|
|||||||
+1
-1
Submodule Enterprise updated: 191c56f2bb...38e089a531
Reference in New Issue
Block a user