Here is the SidebarView toolbar from the app that behaves.
.toolbar {
ToolbarItemGroup(placement: .automatic) {
displayModeToggle
sortMenu
}
}
Here is the main content toolbar from the app that behaves.
@ToolbarContentBuilder
private var windowToolbarContent: some ToolbarContent {
if selectedPhoto != nil {
ToolbarItem(placement: .navigation) {
toolbarTitleCapsule
}
}
ToolbarItemGroup(placement: .primaryAction) {
lockToggleButton
removeLockButton
if selectedPhoto == nil, !showingSlideshow, !(collectionManager.isSelectedCollectionPasswordProtected && collectionManager.isLocked), !filteredPhotos.isEmpty {
Button {
detailPhotoID = filteredPhotos.first?.id
showingSlideshow = true
} label: {
Label("Slideshow", systemImage: "play.fill")
}
}
}
}
Here is the Sidebar toolbar from the app that misbehaves.
.toolbar {
ToolbarItemGroup(placement: .automatic) {
sortMenu
}
}
Here is the main content toolbar from the app that misbehaves.
@ToolbarContentBuilder
private var windowToolbarContent: some ToolbarContent {
ToolbarItem(placement: .navigation) {
roomDirectoryButton
}
if selectedRoomId != nil {
ToolbarItem(placement: .secondaryAction) {
toolbarTitleCapsule
}
}
ToolbarItem(placement: .primaryAction) {
showInspectorButton
}
}
Both apps are open source. Their code is up on GitHub.
Topic:
UI Frameworks
SubTopic:
SwiftUI