Allow joined rooms to be pushed within a space. (#4460)
* Allow joined rooms to be pushed within a space. * Push a room in the space flow tests. Also fixes some snapshots stale snapshots. * Show the selected space/room within a space and set a custom title view.
This commit is contained in:
@@ -14,6 +14,7 @@ struct ClientProxyMockConfiguration {
|
||||
var userID: String = RoomMemberProxyMock.mockMe.userID
|
||||
var deviceID: String?
|
||||
var roomSummaryProvider: RoomSummaryProviderProtocol = RoomSummaryProviderMock(.init())
|
||||
var joinedSpaceRooms: [SpaceRoomProxyProtocol] = []
|
||||
var roomDirectorySearchProxy: RoomDirectorySearchProxyProtocol?
|
||||
|
||||
var recoveryState: SecureBackupRecoveryState = .enabled
|
||||
@@ -92,11 +93,13 @@ extension ClientProxyMock {
|
||||
spaceService = SpaceServiceProxyMock(.init())
|
||||
|
||||
roomForIdentifierClosure = { [weak self] identifier in
|
||||
guard let room = self?.roomSummaryProvider.roomListPublisher.value.first(where: { $0.id == identifier }) else {
|
||||
return nil
|
||||
if let room = self?.roomSummaryProvider.roomListPublisher.value.first(where: { $0.id == identifier }) {
|
||||
await .joined(JoinedRoomProxyMock(.init(id: room.id, name: room.name)))
|
||||
} else if let spaceRoom = configuration.joinedSpaceRooms.first(where: { $0.id == identifier }) {
|
||||
await .joined(JoinedRoomProxyMock(.init(id: spaceRoom.id, name: spaceRoom.name)))
|
||||
} else {
|
||||
nil
|
||||
}
|
||||
|
||||
return await .joined(JoinedRoomProxyMock(.init(id: room.id, name: room.name)))
|
||||
}
|
||||
|
||||
userIdentityForReturnValue = .success(UserIdentityProxyMock(configuration: .init()))
|
||||
|
||||
Reference in New Issue
Block a user