mirror of
https://github.com/yattee/yattee.git
synced 2026-11-02 01:47:18 +00:00
Give the empty tvOS Continue Watching screen a focusable Search button
With nothing in progress the screen showed only a ContentUnavailableView, leaving the focus engine nowhere to land and the remote stuck. Search is the target because it always has a focusable field.
This commit is contained in:
@@ -219,6 +219,16 @@ struct ContinueWatchingView: View {
|
||||
Label(String(localized: "home.continueWatching.title"), systemImage: "play.circle")
|
||||
} description: {
|
||||
Text(String(localized: "home.continueWatching.empty"))
|
||||
} actions: {
|
||||
#if os(tvOS)
|
||||
// Without a focusable element the focus engine has nowhere to
|
||||
// land, and the remote can no longer reach the sidebar either.
|
||||
Button {
|
||||
appEnvironment?.navigationCoordinator.router.select(.search)
|
||||
} label: {
|
||||
Label(String(localized: "continueWatching.empty.search"), systemImage: "magnifyingglass")
|
||||
}
|
||||
#endif
|
||||
}
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user