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:
Arkadiusz Fal
2026-10-15 23:56:33 +02:00
parent 164f828098
commit 2c3216e048
2 changed files with 21 additions and 0 deletions

View File

@@ -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)
}