mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
refactor(healthchat): move the session hooks onto UserHooks
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
//
|
||||
// Copyright 2026 Novaloop AG
|
||||
//
|
||||
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial.
|
||||
// Please see LICENSE files in the repository root for full details.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
#if IS_MAIN_APP
|
||||
/// Builds the HealthChat session-scoped hooks when a user session is created.
|
||||
nonisolated struct HealthChatUserSessionHook: UserSessionHookProtocol {
|
||||
func makeUserHooks(for clientProxy: ClientProxyProtocol) -> UserHooks {
|
||||
let apiService = HealthChatAPIService(tokenProvider: HealthChatOpenIDTokenProvider(clientProxy: clientProxy))
|
||||
return UserHooks(extendedProfileSectionHook: HealthChatExtendedProfileSectionHook(extendedProfileService: ExtendedProfileService(clientProxy: clientProxy)),
|
||||
settingsScreenHook: HealthChatSettingsScreenHook(statusLoader: HealthChatAccountStatusLoader(apiService: apiService)))
|
||||
}
|
||||
|
||||
func configure(_ userSettings: UserSettings, forHomeserver homeserver: String) -> UserSettings {
|
||||
userSettings
|
||||
}
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user