Fixes #2624, fixes #2625 - Add user suggestions in the create room flows.

This commit is contained in:
Stefan Ceriu
2024-04-01 11:37:39 +03:00
committed by Stefan Ceriu
parent c85c1593ee
commit 97d9189077
17 changed files with 252 additions and 60 deletions
@@ -1009,11 +1009,12 @@ class RoomFlowCoordinator: FlowCoordinatorProtocol {
let selectedUsersSubject: CurrentValueSubject<[UserProfileProxy], Never> = .init([])
let stackCoordinator = NavigationStackCoordinator()
let inviteParameters = InviteUsersScreenCoordinatorParameters(selectedUsers: .init(selectedUsersSubject),
roomType: .room(roomProxy: roomProxy),
let inviteParameters = InviteUsersScreenCoordinatorParameters(clientProxy: userSession.clientProxy,
mediaProvider: userSession.mediaProvider,
userDiscoveryService: UserDiscoveryService(clientProxy: userSession.clientProxy),
userIndicatorController: userIndicatorController)
userIndicatorController: userIndicatorController,
selectedUsers: .init(selectedUsersSubject),
roomType: .room(roomProxy: roomProxy))
let coordinator = InviteUsersScreenCoordinator(parameters: inviteParameters)
stackCoordinator.setRootCoordinator(coordinator)
@@ -460,6 +460,10 @@ class UserSessionFlowCoordinator: FlowCoordinatorProtocol {
if case .invitesScreen = stateMachine.state, availableInvitesCount == 1 {
dismissInvitesList(animated: true)
}
Task {
await userSession.clientProxy.trackRecentlyVisitedRoom(roomID)
}
}
private func tearDownRoomFlow(animated: Bool) {