implemented the logic that displays the space selection CTA

This commit is contained in:
Mauro Romito
2026-01-19 20:18:51 +01:00
committed by Mauro
parent 5a0dd23cb4
commit 51c7466fdf
2 changed files with 37 additions and 40 deletions
@@ -61,6 +61,7 @@ class CreateRoomScreenViewModel: CreateRoomScreenViewModelType, CreateRoomScreen
isKnockingFeatureEnabled: appSettings.knockingEnabled,
canSelectSpace: canSelectSpace,
aliasLocalPart: roomAliasNameFromRoomDisplayName(roomName: ""),
topLevelSpaces: canSelectSpace ? userSession.clientProxy.spaceService.topLevelSpacesPublisher.value : [],
bindings: bindings),
mediaProvider: userSession.mediaProvider)
@@ -200,6 +201,15 @@ class CreateRoomScreenViewModel: CreateRoomScreenViewModelType, CreateRoomScreen
}
}
.store(in: &cancellables)
if state.canSelectSpace {
userSession
.clientProxy
.spaceService
.topLevelSpacesPublisher
.weakAssign(to: \.state.topLevelSpaces, on: self)
.store(in: &cancellables)
}
}
private func createRoom() async {