mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-07 04:48:34 +00:00
refactor(healthchat): move the session hooks onto UserHooks
This commit is contained in:
@@ -121,7 +121,6 @@ final class HealthChatMembersFlowCoordinator {
|
||||
let parameters = UserProfileScreenCoordinatorParameters(userID: userID,
|
||||
isPresentedModally: false,
|
||||
userSession: flowParameters.userSession,
|
||||
appHooks: flowParameters.appHooks,
|
||||
analytics: flowParameters.analytics,
|
||||
userIndicatorController: flowParameters.userIndicatorController)
|
||||
let coordinator = UserProfileScreenCoordinator(parameters: parameters)
|
||||
@@ -148,7 +147,7 @@ final class HealthChatMembersFlowCoordinator {
|
||||
private func presentProfileEditor() {
|
||||
let parameters = UserDetailsEditScreenCoordinatorParameters(orientationManager: flowParameters.windowManager,
|
||||
userSession: flowParameters.userSession,
|
||||
mediaUploadingPreprocessor: MediaUploadingPreprocessor(appSettings: flowParameters.appSettings),
|
||||
mediaUploadingPreprocessor: MediaUploadingPreprocessor(userSettings: flowParameters.userSession.userSettings),
|
||||
navigationStackCoordinator: navigationStackCoordinator,
|
||||
userIndicatorController: flowParameters.userIndicatorController)
|
||||
let coordinator = flowParameters.appHooks.userDetailsEditScreenHook.makeCoordinator(parameters: parameters)
|
||||
|
||||
@@ -237,16 +237,7 @@ class UserSessionFlowCoordinator: FlowCoordinatorProtocol {
|
||||
}
|
||||
|
||||
private func setupObservers() {
|
||||
extraTabActions?
|
||||
.sink { [weak self] action in
|
||||
switch action {
|
||||
case .presentRoom(let roomID):
|
||||
self?.handleAppRoute(.room(roomID: roomID, via: []), animated: true)
|
||||
case .presentCall(let roomID, let isVoiceCall):
|
||||
self?.handleAppRoute(.call(roomID: roomID, isVoiceCall: isVoiceCall), animated: true)
|
||||
}
|
||||
}
|
||||
.store(in: &cancellables)
|
||||
setupExtraTabObserver()
|
||||
|
||||
chatsTabFlowCoordinator.actionsPublisher
|
||||
.sink { [weak self] action in
|
||||
@@ -358,6 +349,20 @@ class UserSessionFlowCoordinator: FlowCoordinatorProtocol {
|
||||
.store(in: &cancellables)
|
||||
}
|
||||
|
||||
/// HealthChat: routes the Members tab's actions through the normal app-route handling.
|
||||
private func setupExtraTabObserver() {
|
||||
extraTabActions?
|
||||
.sink { [weak self] action in
|
||||
switch action {
|
||||
case .presentRoom(let roomID):
|
||||
self?.handleAppRoute(.room(roomID: roomID, via: []), animated: true)
|
||||
case .presentCall(let roomID, let isVoiceCall):
|
||||
self?.handleAppRoute(.call(roomID: roomID, isVoiceCall: isVoiceCall), animated: true)
|
||||
}
|
||||
}
|
||||
.store(in: &cancellables)
|
||||
}
|
||||
|
||||
// MARK: - Onboarding
|
||||
|
||||
private func attemptStartingOnboarding() {
|
||||
|
||||
Reference in New Issue
Block a user