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
@@ -17,7 +17,7 @@ enum RoomMemberDetailsScreenViewModelAction {
struct RoomMemberDetailsScreenViewState: BindableState {
let userID: String
let appHooks: AppHooks
let extendedProfileSectionHook: ExtendedProfileSectionHookProtocol
var memberDetails: RoomMemberDetails?
var verificationState: UserIdentityVerificationState?
var isOwnMemberDetails = false
@@ -35,7 +35,7 @@ class RoomMemberDetailsScreenViewModel: RoomMemberDetailsScreenViewModelType, Ro
self.userIndicatorController = userIndicatorController
self.analytics = analytics
let initialViewState = RoomMemberDetailsScreenViewState(userID: userID, appHooks: appHooks, bindings: .init())
let initialViewState = RoomMemberDetailsScreenViewState(userID: userID, extendedProfileSectionHook: userSession.userHooks.extendedProfileSectionHook, bindings: .init())
super.init(initialViewState: userSession.userHooks.roomMemberDetailsScreenHook.update(initialViewState),
mediaProvider: userSession.mediaProvider)
@@ -16,7 +16,7 @@ struct RoomMemberDetailsScreen: View {
Form {
headerSection
context.viewState.appHooks.extendedProfileSectionHook.extendedProfileSection(userID: context.viewState.userID)
context.viewState.extendedProfileSectionHook.extendedProfileSection(userID: context.viewState.userID)
if context.viewState.showVerifyIdentitySection {
verificationSection