Make the SpaceRoomListProxy publish its SpaceRoomProxy updates. (#4607)

Also removes an unused `parent` parameter that was missed when removing the parent name and includes some regenerated snapshots that were missed in the last PR.
This commit is contained in:
Doug
2025-10-09 17:22:43 +01:00
committed by GitHub
parent c588ace336
commit f01f31954d
24 changed files with 91 additions and 63 deletions
@@ -260,7 +260,7 @@ class RoomFlowCoordinator: FlowCoordinatorProtocol {
switch room {
case .joined(let roomProxy):
if roomProxy.infoPublisher.value.isSpace {
switch await userSession.clientProxy.spaceService.spaceRoomList(spaceID: roomProxy.id, parent: nil) {
switch await userSession.clientProxy.spaceService.spaceRoomList(spaceID: roomProxy.id) {
case .success(let spaceRoomListProxy):
actionsSubject.send(.continueWithSpaceFlow(spaceRoomListProxy))
case .failure:
@@ -93,7 +93,7 @@ class SpaceExplorerFlowCoordinator: FlowCoordinatorProtocol {
stateMachine.addRouteMapping { event, fromState, userInfo in
guard event == .selectSpace, case .spaceList = fromState else { return nil }
guard let spaceRoomListProxy = userInfo as? SpaceRoomListProxyProtocol else { fatalError("A space proxy must be provided.") }
return .spaceList(selectedSpaceID: spaceRoomListProxy.spaceRoomProxy.id)
return .spaceList(selectedSpaceID: spaceRoomListProxy.id)
} handler: { [weak self] context in
guard let self, let spaceRoomListProxy = context.userInfo as? SpaceRoomListProxyProtocol else { return }
startSpaceFlow(spaceRoomListProxy: spaceRoomListProxy)
@@ -164,6 +164,6 @@ class SpaceExplorerFlowCoordinator: FlowCoordinatorProtocol {
}
coordinator.start()
selectedSpaceSubject.send(spaceRoomListProxy.spaceRoomProxy.id)
selectedSpaceSubject.send(spaceRoomListProxy.id)
}
}
@@ -21,7 +21,7 @@ enum SpaceFlowCoordinatorEntryPoint {
var spaceID: String {
switch self {
case .space(let spaceRoomListProxy): spaceRoomListProxy.spaceRoomProxy.id
case .space(let spaceRoomListProxy): spaceRoomListProxy.id
case .joinSpace(let spaceRoomProxy): spaceRoomProxy.id
}
}