From 164f828098c4a77f7c4df3f8a8d67bb0a340e390 Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Thu, 15 Oct 2026 23:51:07 +0200 Subject: [PATCH] Give the empty tvOS Accounts screen a focusable Open Sources button With no accounts the screen showed only a ContentUnavailableView, so the focus engine had nothing to land on and the remote could not reach the sidebar again; the app had to be force-quit. Sources is also where an account is signed in. --- Yattee/Localizable.xcstrings | 11 +++++++++++ Yattee/Views/Settings/AccountsListView.swift | 11 +++++++++++ 2 files changed, 22 insertions(+) diff --git a/Yattee/Localizable.xcstrings b/Yattee/Localizable.xcstrings index 4945988a..8927338b 100644 --- a/Yattee/Localizable.xcstrings +++ b/Yattee/Localizable.xcstrings @@ -256,6 +256,17 @@ } } }, + "accounts.empty.openSources" : { + "comment" : "tvOS button on the empty Accounts screen that opens the Sources list", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Open Sources" + } + } + } + }, "accounts.empty.title" : { "localizations" : { "en" : { diff --git a/Yattee/Views/Settings/AccountsListView.swift b/Yattee/Views/Settings/AccountsListView.swift index 9d50cf8f..d5ebdba6 100644 --- a/Yattee/Views/Settings/AccountsListView.swift +++ b/Yattee/Views/Settings/AccountsListView.swift @@ -158,6 +158,17 @@ struct AccountsListView: View { Label(String(localized: "accounts.empty.title"), systemImage: "person.crop.circle") } description: { Text(String(localized: "accounts.empty.description")) + } 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. + // Sources is also where an account is actually signed in. + NavigationLink { + SourcesListView() + } label: { + Label(String(localized: "accounts.empty.openSources"), systemImage: "server.rack") + } + #endif } .frame(maxWidth: .infinity, maxHeight: .infinity) }