mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Add hooks for room creation and privacy & security settings screen. (#6270)
Add hooks for the create room and security and privacy screens.
This commit is contained in:
@@ -48,6 +48,12 @@ final nonisolated class AppHooks: AppHooksProtocol {
|
||||
|
||||
@AppHook(default: DefaultRecoveryKeyScreenHook())
|
||||
var recoveryKeyScreenHook: RecoveryKeyScreenHookProtocol
|
||||
|
||||
@AppHook(default: DefaultCreateRoomScreenHook())
|
||||
var createRoomScreenHook: CreateRoomScreenHookProtocol
|
||||
|
||||
@AppHook(default: DefaultSecurityAndPrivacyScreenHook())
|
||||
var securityAndPrivacyScreenHook: SecurityAndPrivacyScreenHookProtocol
|
||||
#endif
|
||||
|
||||
@AppHook(default: DefaultTracingHook())
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// Copyright 2026 Element Creations Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial.
|
||||
// Please see LICENSE files in the repository root for full details.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
nonisolated protocol CreateRoomScreenHookProtocol: Sendable {
|
||||
@MainActor func update(_ viewState: CreateRoomScreenViewState, homeserver: String) -> CreateRoomScreenViewState
|
||||
}
|
||||
|
||||
struct DefaultCreateRoomScreenHook: CreateRoomScreenHookProtocol {
|
||||
func update(_ viewState: CreateRoomScreenViewState, homeserver: String) -> CreateRoomScreenViewState {
|
||||
viewState
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// Copyright 2026 Element Creations Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial.
|
||||
// Please see LICENSE files in the repository root for full details.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
nonisolated protocol SecurityAndPrivacyScreenHookProtocol: Sendable {
|
||||
@MainActor func update(_ viewState: SecurityAndPrivacyScreenViewState, homeserver: String) -> SecurityAndPrivacyScreenViewState
|
||||
}
|
||||
|
||||
struct DefaultSecurityAndPrivacyScreenHook: SecurityAndPrivacyScreenHookProtocol {
|
||||
func update(_ viewState: SecurityAndPrivacyScreenViewState, homeserver: String) -> SecurityAndPrivacyScreenViewState {
|
||||
viewState
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user