Make the SpaceRoomListProxy publish its SpaceRoomProxy updates. (#4607)

Also removes an unused `parent` parameter that was missed when removing the parent name and includes some regenerated snapshots that were missed in the last PR.
This commit is contained in:
Doug
2025-10-09 17:22:43 +01:00
committed by GitHub
parent c588ace336
commit f01f31954d
24 changed files with 91 additions and 63 deletions
@@ -61,7 +61,7 @@ class SpaceListScreenViewModelTests: XCTestCase {
let action = try await deferred.fulfill()
switch action {
case .selectSpace(let spaceRoomListProxy) where spaceRoomListProxy.spaceRoomProxy.id == selectedSpace.id:
case .selectSpace(let spaceRoomListProxy) where spaceRoomListProxy.id == selectedSpace.id:
break
default:
XCTFail("The action should select the space.")
@@ -102,7 +102,7 @@ class SpaceListScreenViewModelTests: XCTestCase {
])
spaceServiceProxy = SpaceServiceProxyMock(.init())
spaceServiceProxy.joinedSpacesPublisher = joinedSpacesSubject.asCurrentValuePublisher()
spaceServiceProxy.spaceRoomListSpaceIDParentClosure = { [joinedSpacesSubject] spaceID, _ in
spaceServiceProxy.spaceRoomListSpaceIDClosure = { [joinedSpacesSubject] spaceID in
guard let spaceRoomProxy = joinedSpacesSubject?.value.first(where: { $0.id == spaceID }) else { return .failure(.missingSpace) }
return .success(SpaceRoomListProxyMock(.init(spaceRoomProxy: spaceRoomProxy)))
}