Add hooks for the RoomDetails, RoomMemberDetails and UserProfile screens. (#5980)

Also adds an @AppHook macro.
This commit is contained in:
Doug
2026-08-05 12:41:18 +01:00
committed by GitHub
parent 68f7f2b301
commit 80530f0006
31 changed files with 328 additions and 126 deletions
@@ -22,8 +22,9 @@ struct UserProfileScreenViewModelTests {
let viewModel = UserProfileScreenViewModel(userID: profile.id,
isPresentedModally: false,
userSession: UserSessionMock(.init(clientProxy: clientProxy)),
userIndicatorController: userIndicatorController,
analytics: AnalyticsServiceMock(.init()))
appHooks: AppHooks(),
analytics: AnalyticsServiceMock(.init()),
userIndicatorController: userIndicatorController)
let context = viewModel.context
let waitForMemberToLoad = deferFulfillment(context.observe(\.viewState.userProfile)) { $0 != nil }
@@ -45,8 +46,9 @@ struct UserProfileScreenViewModelTests {
let viewModel = UserProfileScreenViewModel(userID: profile.id,
isPresentedModally: false,
userSession: UserSessionMock(.init(clientProxy: clientProxy)),
userIndicatorController: userIndicatorController,
analytics: AnalyticsServiceMock(.init()))
appHooks: AppHooks(),
analytics: AnalyticsServiceMock(.init()),
userIndicatorController: userIndicatorController)
let context = viewModel.context
let waitForMemberToLoad = deferFulfillment(context.observe(\.viewState.userProfile)) { $0 != nil }
@@ -70,8 +72,9 @@ struct UserProfileScreenViewModelTests {
let viewModel = UserProfileScreenViewModel(userID: profile.id,
isPresentedModally: false,
userSession: UserSessionMock(.init(clientProxy: clientProxy)),
userIndicatorController: userIndicatorController,
analytics: AnalyticsServiceMock(.init()))
appHooks: AppHooks(),
analytics: AnalyticsServiceMock(.init()),
userIndicatorController: userIndicatorController)
let context = viewModel.context