From 2c3216e0480e4b6f84609f87990023fc6ecc71f8 Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Thu, 15 Oct 2026 23:56:33 +0200 Subject: [PATCH] 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. --- Yattee/Localizable.xcstrings | 11 +++++++++++ Yattee/Views/Home/ContinueWatchingView.swift | 10 ++++++++++ 2 files changed, 21 insertions(+) diff --git a/Yattee/Localizable.xcstrings b/Yattee/Localizable.xcstrings index 8927338b..4e803ee4 100644 --- a/Yattee/Localizable.xcstrings +++ b/Yattee/Localizable.xcstrings @@ -1949,6 +1949,17 @@ } } }, + "continueWatching.empty.search" : { + "comment" : "tvOS button on the empty Continue Watching screen that opens Search", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Search Videos" + } + } + } + }, "continueWatching.remove" : { "comment" : "Remove from continue watching", "localizations" : { diff --git a/Yattee/Views/Home/ContinueWatchingView.swift b/Yattee/Views/Home/ContinueWatchingView.swift index 457d371a..3570176b 100644 --- a/Yattee/Views/Home/ContinueWatchingView.swift +++ b/Yattee/Views/Home/ContinueWatchingView.swift @@ -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) }