mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user