The space tweaks continue! (#4606)

* Update a string on the space announcement sheet.

* Don't show space rooms after using the join button in the space room list.

* Allow the Deselect All button to Select (almost) All as well.

* Fix the cells in the leave space sheet when there are only admin rooms.
This commit is contained in:
Doug
2025-10-09 16:56:54 +01:00
committed by GitHub
parent 40367eeec9
commit b496955f6b
15 changed files with 63 additions and 63 deletions
@@ -95,6 +95,11 @@ class SpaceScreenViewModel: SpaceScreenViewModelType, SpaceScreenViewModelProtoc
for room in leaveHandle.rooms {
room.isSelected = false
}
case .selectAllLeaveRoomDetails:
guard let leaveHandle = state.bindings.leaveHandle else { fatalError("The leave handle should be available.") }
for room in leaveHandle.rooms where !room.isLastAdmin {
room.isSelected = true
}
case .toggleLeaveSpaceRoomDetails(let spaceRoomID):
guard let room = state.bindings.leaveHandle?.rooms.first(where: { $0.spaceRoomProxy.id == spaceRoomID }) else {
fatalError("The space room to toggle is not in the list of rooms to leave.")
@@ -125,14 +130,7 @@ class SpaceScreenViewModel: SpaceScreenViewModelType, SpaceScreenViewModelProtoc
return
}
// If multiple join operations are running, then only show the last one.
guard state.joiningRoomIDs == [spaceRoomProxy.id] else { return }
if spaceRoomProxy.isSpace {
await selectSpace(spaceRoomProxy)
} else {
actionsSubject.send(.selectRoom(roomID: spaceRoomProxy.id))
}
// We don't want to show the space room after joining it this way 🤷‍♂️
}
private func selectSpace(_ spaceRoomProxy: SpaceRoomProxyProtocol) async {