Hide toolbar account switchers where the sidebar already shows one

This commit is contained in:
Arkadiusz Fal
2026-09-16 18:16:10 +02:00
parent a5ed91620f
commit 5d33e4a558
5 changed files with 40 additions and 12 deletions

View File

@@ -492,10 +492,12 @@ struct SubscriptionsView: View {
.toolbarTitleDisplayMode(.inlineLarge)
#endif
.toolbar {
// No switcher on macOS: the sidebar row is the one persistent
// switcher surface there.
// No switcher wherever a sidebar shows one: the macOS
// sidebar row and the iPad sidebar's bottom bar are the
// persistent switcher surfaces there, so the toolbar menu
// is compact-width-only.
#if !os(macOS)
if DataContextSwitcherVisibility.showsPickers(in: appEnvironment) {
if DataContextSwitcherVisibility.showsToolbarPickers(in: appEnvironment, horizontalSizeClass: horizontalSizeClass) {
ToolbarItem(placement: viewOptionsPlacement) {
DataContextSwitcherMenu()
}