Remove the protocol for SpaceServiceRoom given its a struct type. (#5000)

* Remove the protocol for SpaceServiceRoom given its a struct type.

* Fix a few missed mocks in the unit tests.
This commit is contained in:
Doug
2026-01-26 09:45:46 +00:00
committed by GitHub
parent 3b231339cd
commit 06f37dacae
46 changed files with 459 additions and 545 deletions
@@ -305,7 +305,7 @@ class SecurityAndPrivacyScreenViewModel: SecurityAndPrivacyScreenViewModelType,
}
private func setupSelectableJoinedSpaces() async {
var joinedParentSpaces: [SpaceServiceRoomProtocol] = []
var joinedParentSpaces: [SpaceServiceRoom] = []
switch await clientProxy.spaceService.joinedParents(childID: roomProxy.id) {
case .success(let value):
joinedParentSpaces = value
@@ -313,7 +313,7 @@ class SecurityAndPrivacyScreenViewModel: SecurityAndPrivacyScreenViewModelType,
break
}
var nonParentJoinedSpaces: [SpaceServiceRoomProtocol] = []
var nonParentJoinedSpaces: [SpaceServiceRoom] = []
for spaceID in state.currentSettings.accessType.spaceIDs where !joinedParentSpaces.contains(where: { $0.id == spaceID }) {
if case let .success(.some(space)) = await clientProxy.spaceService.spaceForIdentifier(spaceID: spaceID) {
nonParentJoinedSpaces.append(space)