From 4fe7cceda5f453f1d0a1f109d567d309ab173df4 Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Fri, 16 Oct 2026 23:59:30 +0200 Subject: [PATCH] Give the empty tvOS PeerTube instance browser a Retry button When the directory returned no instances without an error, the tvOS search header was hidden and the no-results state had nothing focusable. --- .../Settings/PeerTubeInstancesExploreView.swift | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Yattee/Views/Settings/PeerTubeInstancesExploreView.swift b/Yattee/Views/Settings/PeerTubeInstancesExploreView.swift index e02c7a99..7f64a2cb 100644 --- a/Yattee/Views/Settings/PeerTubeInstancesExploreView.swift +++ b/Yattee/Views/Settings/PeerTubeInstancesExploreView.swift @@ -152,6 +152,18 @@ struct PeerTubeInstancesExploreView: View { Label(String(localized: "peertube.explore.noResults"), systemImage: "magnifyingglass") } description: { Text(String(localized: "peertube.explore.noResults.description")) + } actions: { + #if os(tvOS) + // With nothing loaded the search header is hidden too, so + // without this the remote would have nothing to focus. + if allInstances.isEmpty { + Button(String(localized: "common.retry")) { + Task { + await loadAllInstances() + } + } + } + #endif } .frame(maxWidth: .infinity, maxHeight: .infinity) } else {