Add back custom identifiers for invalidated room, avoid duplicates and gaps on the room list

This commit is contained in:
Stefan Ceriu
2023-06-19 14:35:03 +03:00
committed by Stefan Ceriu
parent ee643f7a69
commit d120a53ebd
5 changed files with 26 additions and 18 deletions
@@ -62,7 +62,7 @@ class MockClientProxy: ClientProxyProtocol {
func uploadMedia(_ media: MediaInfo) async -> Result<String, ClientProxyError> {
.failure(.failedUploadingMedia(.unknown))
}
var roomForIdentifierMocks: [String: RoomProxyMock] = .init()
@MainActor
func roomForIdentifier(_ identifier: String) async -> RoomProxyProtocol? {
@@ -77,7 +77,7 @@ class MockClientProxy: ClientProxyProtocol {
switch room {
case .empty:
return RoomProxyMock(with: .init(displayName: "Empty room"))
case .filled(let details):
case .filled(let details), .invalidated(let details):
return RoomProxyMock(with: .init(displayName: details.name))
}
}