mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 10:33:45 +00:00
refactor(healthchat): move the session hooks onto UserHooks
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user