diff --git a/Yattee/Views/Home/HistoryListView.swift b/Yattee/Views/Home/HistoryListView.swift index 3cd2a6b7..4c8327f9 100644 --- a/Yattee/Views/Home/HistoryListView.swift +++ b/Yattee/Views/Home/HistoryListView.swift @@ -331,11 +331,15 @@ struct HistoryListView: View { ToolbarSpacer(.flexible, placement: .primaryAction) } #endif + // No switcher on macOS: the sidebar row is the one persistent + // switcher surface there. + #if !os(macOS) if DataContextSwitcherVisibility.showsPickers(in: appEnvironment) { ToolbarItem(placement: viewOptionsPlacement) { DataContextSwitcherMenu() } } + #endif // View options button (always visible) ToolbarItem(placement: viewOptionsPlacement) { Button { diff --git a/Yattee/Views/Home/HomeView.swift b/Yattee/Views/Home/HomeView.swift index 16397752..b923123e 100644 --- a/Yattee/Views/Home/HomeView.swift +++ b/Yattee/Views/Home/HomeView.swift @@ -147,17 +147,6 @@ struct HomeView: View { appEnvironment?.settingsManager.listStyle ?? .inset } - #if !os(tvOS) - /// Same edge the switcher sits on in Subscriptions/History/Playlists: - /// leading on macOS, trailing elsewhere. - private var switcherPlacement: ToolbarItemPlacement { - #if os(macOS) - .navigation - #else - .primaryAction - #endif - } - #endif var body: some View { // Split from `chrome` so the modifier chain stays within what the @@ -177,9 +166,11 @@ struct HomeView: View { .toolbarTitleDisplayMode(.inlineLarge) #endif .toolbar { - #if !os(tvOS) + // No switcher on macOS: the sidebar row is the one persistent + // switcher surface there. + #if !os(tvOS) && !os(macOS) if DataContextSwitcherVisibility.showsPickers(in: appEnvironment) { - ToolbarItem(placement: switcherPlacement) { + ToolbarItem(placement: .primaryAction) { DataContextSwitcherMenu() } } diff --git a/Yattee/Views/Home/PlaylistsListView.swift b/Yattee/Views/Home/PlaylistsListView.swift index 921b9757..b0628fa4 100644 --- a/Yattee/Views/Home/PlaylistsListView.swift +++ b/Yattee/Views/Home/PlaylistsListView.swift @@ -229,11 +229,15 @@ struct PlaylistsListView: View { ToolbarSpacer(.flexible, placement: .primaryAction) } #endif + // No switcher on macOS: the sidebar row is the one persistent + // switcher surface there. + #if !os(macOS) if DataContextSwitcherVisibility.showsPickers(in: appEnvironment) { ToolbarItem(placement: viewOptionsPlacement) { DataContextSwitcherMenu() } } + #endif ToolbarItem(placement: viewOptionsPlacement) { Button { showViewOptions = true diff --git a/Yattee/Views/Subscriptions/SubscriptionsView.swift b/Yattee/Views/Subscriptions/SubscriptionsView.swift index 7c488a7d..2fe215b7 100644 --- a/Yattee/Views/Subscriptions/SubscriptionsView.swift +++ b/Yattee/Views/Subscriptions/SubscriptionsView.swift @@ -492,11 +492,15 @@ struct SubscriptionsView: View { .toolbarTitleDisplayMode(.inlineLarge) #endif .toolbar { + // No switcher on macOS: the sidebar row is the one persistent + // switcher surface there. + #if !os(macOS) if DataContextSwitcherVisibility.showsPickers(in: appEnvironment) { ToolbarItem(placement: viewOptionsPlacement) { DataContextSwitcherMenu() } } + #endif ToolbarItem(placement: viewOptionsPlacement) { Button { showViewOptions = true