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:
+1
-1
@@ -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
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user