refactor(healthchat): move the session hooks onto UserHooks

This commit is contained in:
Sedat Qaja
2026-10-19 09:18:07 +02:00
parent 1b34a71857
commit 979d20572d
22 changed files with 725 additions and 409 deletions
@@ -18,7 +18,7 @@ struct UserProfileScreenViewState: BindableState {
let userID: String
let isOwnUser: Bool
let isPresentedModally: Bool
let appHooks: AppHooks
let extendedProfileSectionHook: ExtendedProfileSectionHookProtocol
var userProfile: UserProfile?
var isIdentityKnown = false
@@ -34,7 +34,7 @@ class UserProfileScreenViewModel: UserProfileScreenViewModelType, UserProfileScr
let initialViewState = UserProfileScreenViewState(userID: userID,
isOwnUser: userID == userSession.clientProxy.userID,
isPresentedModally: isPresentedModally,
appHooks: appHooks,
extendedProfileSectionHook: userSession.userHooks.extendedProfileSectionHook,
bindings: .init())
super.init(initialViewState: userSession.userHooks.userProfileScreenHook.update(initialViewState),
@@ -16,7 +16,7 @@ struct UserProfileScreen: View {
Form {
headerSection
context.viewState.appHooks.extendedProfileSectionHook.extendedProfileSection(userID: context.viewState.userID)
context.viewState.extendedProfileSectionHook.extendedProfileSection(userID: context.viewState.userID)
}
.compoundList()
.navigationTitle(L10n.screenRoomMemberDetailsTitle)