Joining a space from the room flow. (#4563)

* Add the More menu to SpaceScreen.

And a simple way to leave a space for testing.

* Start a space flow when accepting a space invite from the room flow.

* Minimise the tab bar on iOS 26 when scrolling down.

* Enable spaces by default!
This commit is contained in:
Doug
2025-10-02 10:58:38 +01:00
committed by GitHub
parent 3215f8c269
commit 621b72f162
13 changed files with 128 additions and 29 deletions
@@ -60,6 +60,13 @@ class SpaceScreenViewModel: SpaceScreenViewModelType, SpaceScreenViewModelProtoc
selectedSpaceRoomPublisher
.weakAssign(to: \.state.selectedSpaceRoomID, on: self)
.store(in: &cancellables)
Task {
if case let .joined(roomProxy) = await userSession.clientProxy.roomForIdentifier(spaceRoomListProxy.spaceRoomProxy.id),
case let .success(permalinkURL) = await roomProxy.matrixToPermalink() {
state.permalink = permalinkURL
}
}
}
// MARK: - Public
@@ -81,6 +88,15 @@ class SpaceScreenViewModel: SpaceScreenViewModelType, SpaceScreenViewModelProtoc
}
case .spaceAction(.join(let spaceRoomProxy)):
Task { await join(spaceRoomProxy) }
case .leaveSpace:
#if DEBUG
Task { // Temporary implementation to make joining a space easier to test.
if case let .joined(roomProxy) = await clientProxy.roomForIdentifier(spaceRoomListProxy.spaceRoomProxy.id),
case .success = await roomProxy.leaveRoom() {
actionsSubject.send(.leftSpace)
}
}
#endif
}
}