mirror of
https://github.com/yattee/yattee.git
synced 2026-10-23 05:02:53 +00:00
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.
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user