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

@@ -32,6 +32,11 @@ final class NavigationRouter {
/// sidebar layout so it is created and loaded once.
let sidebarManager = SidebarManager()
/// Set when Settings was requested in a layout without a Settings section
/// (the iPhone tab bar, unless the user added the tab). Home presents its
/// Settings sheet and clears it.
var pendingSettingsSheet = false
@ObservationIgnored private var hasAppliedStartupTab = false
@ObservationIgnored private var isSidebarManagerConfigured = false
@@ -139,6 +144,10 @@ final class NavigationRouter {
case .sources:
host = .home
root = .mediaSources
case .settings:
host = .home
root = nil
pendingSettingsSheet = true
default:
host = .home
root = current.navigationDestination()