Open Settings from yattee://settings

SettingsView owns its navigation stack, so pushing it onto a section's
stack rendered nothing. Select the Settings section where the layout has
one, otherwise present Home's settings sheet; open the Settings window on
macOS.
This commit is contained in:
Arkadiusz Fal
2026-10-05 23:37:14 +02:00
parent dea4f590ec
commit 498a282396
5 changed files with 66 additions and 4 deletions

View File

@@ -9,6 +9,9 @@ import SwiftUI
struct ContentView: View {
@Environment(\.appEnvironment) private var appEnvironment
#if os(macOS)
@Environment(\.openWindow) private var openWindow
#endif
var body: some View {
Group {
@@ -79,6 +82,9 @@ struct ContentView: View {
ExpandedPlayerWindowManager.shared.endInlineOverlay()
}
}
.onChange(of: appEnvironment.navigationCoordinator.openSettingsWindowRequest) { _, _ in
openWindow(id: "settings")
}
.onChange(of: appEnvironment.navigationCoordinator.playerExpandTrigger) { _, _ in
if appEnvironment.settingsManager.macPlayerSeparateWindow {
presentExpandedPlayerWindow(appEnvironment: appEnvironment)