Minor space tweaks (#4577)

* Hide the space ShareLink on iOS 26 for now.

* Don't allow the last admin to leave a space.
This commit is contained in:
Doug
2025-10-07 08:16:48 +01:00
committed by GitHub
parent 93f712779d
commit 0f38f303ab
23 changed files with 262 additions and 132 deletions
@@ -23,8 +23,8 @@ struct SpaceScreen: View {
.navigationTitle(context.viewState.spaceName)
.navigationBarTitleDisplayMode(.inline)
.toolbar { toolbar }
.sheet(item: $context.leaveHandle) { _ in
LeaveSpaceView(context: context)
.sheet(item: $context.leaveHandle) { leaveHandle in
LeaveSpaceView(context: context, leaveHandle: leaveHandle)
}
}
@@ -56,7 +56,8 @@ struct SpaceScreen: View {
}
ToolbarItemGroup(placement: .secondaryAction) {
if let permalink = context.viewState.permalink {
// FIXME: The ShareLink crashes on iOS 26 due to the share sheet failing to morph out of the button 🤦‍♂️
if let permalink = context.viewState.permalink, #unavailable(iOS 26.0) {
Section {
ShareLink(item: permalink) {
Label(L10n.actionShare, icon: \.shareIos)