mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Space flow improvements. (#4430)
* Space flow improvements - Use a state machine to select a space. - Add a SpaceFlowCoordinator for recursively presenting subspaces. - Get the spaceRoomListProxy when tapping on the space so we can indicate failures. - Fix the total room count in SpaceListScreen. * Refactor spaceRoom → spaceRoomProxy. * Add a UI test for the Spaces flow.
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
// Please see LICENSE files in the repository root for full details.
|
||||
//
|
||||
|
||||
import Combine
|
||||
import Foundation
|
||||
import MatrixRustSDK
|
||||
|
||||
@@ -27,3 +28,16 @@ extension SpaceServiceProxyMock {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension SpaceServiceProxyMock.Configuration {
|
||||
static var populated: SpaceServiceProxyMock.Configuration {
|
||||
let spaceRoomLists = [SpaceRoomProxyProtocol].mockJoinedSpaces.map {
|
||||
($0.id, SpaceRoomListProxyMock(.init(spaceRoomProxy: $0, initialSpaceRooms: .mockSpaceList)))
|
||||
}
|
||||
let subSpaceRoomLists = [SpaceRoomProxyProtocol].mockSpaceList.map {
|
||||
($0.id, SpaceRoomListProxyMock(.init(spaceRoomProxy: $0, initialSpaceRooms: .mockSingleRoom)))
|
||||
}
|
||||
|
||||
return .init(joinedSpaces: .mockJoinedSpaces, spaceRoomLists: .init(uniqueKeysWithValues: spaceRoomLists + subSpaceRoomLists))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user