mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-10-31 08:15:24 +00:00
dffeb4f9bb
* Add HealthChat API and extended profile services Expose OpenID tokens and homeserver credentials from the client proxy, and add fork-only services for the HealthChat member directory backend (api.healthchat.ch) plus a service that reads MSC4133 extended profile fields directly from the homeserver. Groundwork for the members tab and the profile screens. Claude-Session: https://claude.ai/code/session_013qdTbAWsZj2quQzEkagXaS * Show extended profile details on the profile screens Add a UserProfileScreenHook that lets the fork inject an extra Form section below the header of the user profile and room member details screens. The HealthChat implementation loads the MSC4133 extended profile fields and renders them with tappable phone/email/website links, hiding the section entirely for profiles without any fields. Strings live in a new fork-only HealthChat.strings table (de/en/fr, generated as HealthChatL10n via SwiftGen) since Untranslated.strings pins the English bundle. Claude-Session: https://claude.ai/code/session_013qdTbAWsZj2quQzEkagXaS
76 lines
2.4 KiB
Swift
76 lines
2.4 KiB
Swift
//
|
|
// Copyright 2025 Element Creations Ltd.
|
|
// Copyright 2024-2025 New Vector 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
|
|
import Macros
|
|
import Synchronization
|
|
|
|
final nonisolated class AppHooks: AppHooksProtocol {
|
|
#if IS_MAIN_APP
|
|
func configure(with userSession: UserSessionProtocol?) async {
|
|
await userSessionHook.configure(with: userSession)
|
|
await extendedProfileSectionHook.configure(with: userSession)
|
|
}
|
|
|
|
@AppHook(default: DefaultAppSettingsHook())
|
|
var appSettingsHook: AppSettingsHookProtocol
|
|
|
|
@AppHook(default: DefaultCompoundHook())
|
|
var compoundHook: CompoundHookProtocol
|
|
|
|
@AppHook(default: DefaultBugReportHook())
|
|
var bugReportHook: BugReportHookProtocol
|
|
|
|
@AppHook(default: DefaultOAuthPresenterHook())
|
|
var oAuthPresenterHook: OAuthPresenterHookProtocol
|
|
|
|
@AppHook(default: DefaultUserSessionHook())
|
|
var userSessionHook: UserSessionHookProtocol
|
|
|
|
@AppHook(default: DefaultRoomScreenHook())
|
|
var roomScreenHook: RoomScreenHookProtocol
|
|
|
|
@AppHook(default: DefaultRoomDetailsScreenHook())
|
|
var roomDetailsScreenHook: RoomDetailsScreenHookProtocol
|
|
|
|
@AppHook(default: DefaultRoomMemberDetailsScreenHook())
|
|
var roomMemberDetailsScreenHook: RoomMemberDetailsScreenHookProtocol
|
|
|
|
@AppHook(default: DefaultUserProfileScreenHook())
|
|
var userProfileScreenHook: UserProfileScreenHookProtocol
|
|
|
|
@AppHook(default: DefaultExtendedProfileSectionHook())
|
|
var extendedProfileSectionHook: ExtendedProfileSectionHookProtocol
|
|
|
|
@AppHook(default: DefaultDeveloperOptionsScreenHook())
|
|
var developerOptionsScreenHook: DeveloperOptionsScreenHookProtocol
|
|
|
|
@AppHook(default: DefaultRecoveryKeyScreenHook())
|
|
var recoveryKeyScreenHook: RecoveryKeyScreenHookProtocol
|
|
#endif
|
|
|
|
@AppHook(default: DefaultTracingHook())
|
|
var tracingHook: TracingHookProtocol
|
|
|
|
@AppHook(default: DefaultClientFactoryHook())
|
|
var clientFactoryHook: ClientFactoryHookProtocol
|
|
|
|
@AppHook(default: DefaultRemoteSettingsHook())
|
|
var remoteSettingsHook: RemoteSettingsHookProtocol
|
|
}
|
|
|
|
nonisolated protocol AppHooksProtocol: Sendable {
|
|
// periphery:ignore - required for the architecture
|
|
func setUp()
|
|
}
|
|
|
|
nonisolated extension AppHooksProtocol {
|
|
// periphery:ignore - required for the architecture
|
|
func setUp() { }
|
|
}
|