Added the banned room proxy (#3744)

* added the banned room proxy

and a way to have a consistent loading + a retry alert

* trailing closure

* indent a comment

* push package.resolved

* updated test case
This commit is contained in:
Mauro
2025-02-06 10:15:36 +01:00
committed by GitHub
parent 3839025caa
commit f86a5a2bb9
13 changed files with 228 additions and 89 deletions
@@ -330,7 +330,7 @@ struct JoinRoomScreen_Previews: PreviewProvider, TestablePreview {
switch mode {
case .unknown:
clientProxy.roomPreviewForIdentifierViaReturnValue = .failure(.sdkError(ClientProxyMockError.generic))
clientProxy.roomPreviewForIdentifierViaReturnValue = .failure(.roomPreviewIsPrivate)
clientProxy.roomForIdentifierReturnValue = nil
case .joinable:
clientProxy.roomPreviewForIdentifierViaReturnValue = .success(RoomPreviewProxyMock.joinable)
@@ -364,7 +364,7 @@ struct JoinRoomScreen_Previews: PreviewProvider, TestablePreview {
case .banned:
clientProxy.roomPreviewForIdentifierViaReturnValue = .success(RoomPreviewProxyMock.banned)
clientProxy.roomForIdentifierClosure = { _ in
.banned
.banned(BannedRoomProxyMock(.init(avatarURL: .mockMXCAvatar)))
}
case .forbidden:
clientProxy.roomPreviewForIdentifierViaReturnValue = .success(RoomPreviewProxyMock.restricted)