Add support for joining rooms from a space. (#4501)

* Add support for joining rooms from a space.

Doesn't yet handle the Join button 🤔

* Handle the join button for both rooms and spaces.

Also refactor more instances of spaceRoom to spaceRoomProxy.
This commit is contained in:
Doug
2025-09-11 16:41:19 +01:00
committed by GitHub
parent 880f2060f4
commit c2ac60f1e6
30 changed files with 304 additions and 34 deletions
@@ -30,6 +30,7 @@ struct SpaceScreen: View {
ForEach(context.viewState.rooms, id: \.id) { spaceRoomProxy in
SpaceRoomCell(spaceRoomProxy: spaceRoomProxy,
isSelected: spaceRoomProxy.id == context.viewState.selectedSpaceRoomID,
isJoining: context.viewState.joiningRoomIDs.contains(spaceRoomProxy.id),
mediaProvider: context.mediaProvider) { action in
context.send(viewAction: .spaceAction(action))
}
@@ -78,7 +79,7 @@ struct SpaceScreen_Previews: PreviewProvider, TestablePreview {
let viewModel = SpaceScreenViewModel(spaceRoomListProxy: spaceRoomListProxy,
spaceServiceProxy: SpaceServiceProxyMock(.init()),
selectedSpaceRoomPublisher: .init(nil),
mediaProvider: MediaProviderMock(configuration: .init()),
userSession: UserSessionMock(.init()),
userIndicatorController: UserIndicatorControllerMock())
return viewModel
}