mirror of
https://github.com/yattee/yattee.git
synced 2026-10-24 05:32:53 +00:00
Dismiss sheets when navigation arrives from outside the app
Tapping a new-videos notification while Home's Settings sheet was up switched to the Subscriptions feed underneath the sheet, so the app came back still showing Settings. The existing dismissSettings() hook was never called. NavigationCoordinator.dismissPresentations() bumps a generation that the main window's root sheet host and screen sheets (Home's Settings, Remote Devices, Customize Home; Subscriptions' view options and data) observe via .dismissesOnExternalNavigation(_:). The notification, deep links and Handoff call it; in-app navigation and layout swaps do not. The expanded player keeps its own sheets. The notification also collapses the expanded player so the feed it opens is visible.
This commit is contained in:
@@ -26,7 +26,10 @@ struct ContentView: View {
|
||||
}
|
||||
// Shared sheets for the main window. The expanded player hosts its own,
|
||||
// and takes global requests while it is up.
|
||||
.appSheetHost(isTopLevel: appEnvironment?.navigationCoordinator.isPlayerExpanded != true)
|
||||
.appSheetHost(
|
||||
isTopLevel: appEnvironment?.navigationCoordinator.isPlayerExpanded != true,
|
||||
dismissesOnExternalNavigation: true
|
||||
)
|
||||
.toastOverlay()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user