mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 10:33:45 +00:00
b6ccbbc6c3
* Add a UserHooks system with just the CreateRoomScreenHook for now. * Move more hooks into UserHooks. * Pass the ClientProxy to makeUserHooks instead of calling AppHooks.configure(with:). * Update the Enterprise submodule.
29 lines
835 B
Swift
29 lines
835 B
Swift
//
|
|
// 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 MatrixRustSDK
|
|
|
|
nonisolated protocol UserSessionHookProtocol: Sendable {
|
|
#if IS_MAIN_APP
|
|
@MainActor func makeUserHooks(for clientProxy: ClientProxyProtocol) -> UserHooks
|
|
#endif
|
|
|
|
func configure(_ userSettings: UserSettings, forHomeserver homeserver: String) -> UserSettings
|
|
}
|
|
|
|
nonisolated struct DefaultUserSessionHook: UserSessionHookProtocol {
|
|
#if IS_MAIN_APP
|
|
func makeUserHooks(for clientProxy: ClientProxyProtocol) -> UserHooks {
|
|
UserHooks()
|
|
}
|
|
#endif
|
|
|
|
func configure(_ userSettings: UserSettings, forHomeserver homeserver: String) -> UserSettings {
|
|
userSettings
|
|
}
|
|
}
|