mirror of
https://github.com/yattee/yattee.git
synced 2026-11-03 18:37:49 +00:00
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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user