mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-10-31 16:24:11 +00:00
26 lines
872 B
Swift
26 lines
872 B
Swift
//
|
|
// 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
|
|
// Conforming to the nonisolated hook protocol would infer nonisolated, but the
|
|
// service is main-actor state — the hook's requirements are all @MainActor anyway.
|
|
@MainActor
|
|
final class HealthChatExtendedProfileSectionHook: ExtendedProfileSectionHookProtocol {
|
|
private let extendedProfileService: ExtendedProfileServiceProtocol
|
|
|
|
init(extendedProfileService: ExtendedProfileServiceProtocol) {
|
|
self.extendedProfileService = extendedProfileService
|
|
}
|
|
|
|
func extendedProfileSection(userID: String) -> AnyView? {
|
|
AnyView(HealthChatExtendedProfileSection(userID: userID, service: extendedProfileService))
|
|
}
|
|
}
|
|
#endif
|