mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 19:44:05 +00:00
Use the SDK's SpaceService, SpaceRoom and SpaceRoomList. (#4455)
This commit is contained in:
@@ -91,7 +91,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.spaceRoom.id)
|
||||
return .spaceList(selectedSpaceID: spaceRoomListProxy.spaceRoomProxy.id)
|
||||
} handler: { [weak self] context in
|
||||
guard let self, let spaceRoomListProxy = context.userInfo as? SpaceRoomListProxyProtocol else { return }
|
||||
startSpaceFlow(spaceRoomListProxy: spaceRoomListProxy)
|
||||
@@ -156,6 +156,6 @@ class SpaceExplorerFlowCoordinator: FlowCoordinatorProtocol {
|
||||
}
|
||||
|
||||
coordinator.start()
|
||||
selectedSpaceSubject.send(spaceRoomListProxy.spaceRoom.id)
|
||||
selectedSpaceSubject.send(spaceRoomListProxy.spaceRoomProxy.id)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ class SpaceFlowCoordinator: FlowCoordinatorProtocol {
|
||||
stateMachine.addRouteMapping { event, fromState, userInfo in
|
||||
guard event == .startChildFlow, case .space = fromState else { return nil }
|
||||
guard let spaceRoomListProxy = userInfo as? SpaceRoomListProxyProtocol else { fatalError("A space proxy must be provided.") }
|
||||
return .presentingChild(childSpaceID: spaceRoomListProxy.spaceRoom.id, previousState: fromState)
|
||||
return .presentingChild(childSpaceID: spaceRoomListProxy.spaceRoomProxy.id, previousState: fromState)
|
||||
} handler: { [weak self] context in
|
||||
guard let self, let spaceRoomListProxy = context.userInfo as? SpaceRoomListProxyProtocol else { return }
|
||||
startChildFlow(for: spaceRoomListProxy)
|
||||
|
||||
Reference in New Issue
Block a user