mirror of
https://github.com/yattee/yattee.git
synced 2026-05-13 02:45:03 +00:00
Fix tvOS focus trap on empty Home after fresh install
Render a focusable empty state on tvOS Home when no sections have content, with an "Open Sources" button that switches the sidebar selection. Without a focusable view the tvOS focus engine had no target, leaving the sidebar unreachable after the initial iCloud alert was dismissed. Also wire the selectedSidebarItem onChange handler into the tvOS TabView, which was missing and prevented programmatic sidebar selection.
This commit is contained in:
@@ -664,6 +664,11 @@ struct UnifiedTabView: View {
|
||||
.onChange(of: navigationCoordinator?.pendingNavigation) { _, newValue in
|
||||
handlePendingNavigation(newValue)
|
||||
}
|
||||
.onChange(of: navigationCoordinator?.selectedSidebarItem) { _, newItem in
|
||||
guard let item = newItem else { return }
|
||||
selection = item
|
||||
navigationCoordinator?.selectedSidebarItem = nil
|
||||
}
|
||||
}
|
||||
|
||||
/// Applies the configured startup tab on first appearance.
|
||||
|
||||
Reference in New Issue
Block a user