Give the tvOS media-source-not-found screen an Open Sources button

A media source destination whose source was removed rendered a bare
ContentUnavailableView, so the remote had nothing to focus.
This commit is contained in:
Arkadiusz Fal
2026-10-16 23:59:09 +02:00
parent 9002b253d0
commit 1f7c471fcc
2 changed files with 19 additions and 0 deletions

View File

@@ -190,6 +190,14 @@ private struct MediaSourceByIDView: View {
Label(String(localized: "navigation.sourceNotFound"), systemImage: "externaldrive.badge.exclamationmark")
} description: {
Text(String(localized: "navigation.sourceNotFound.description"))
} actions: {
#if os(tvOS)
// Nothing else here is focusable, and as a sidebar source this
// is a tab root that Menu cannot pop.
Button(String(localized: "navigation.sourceNotFound.openSources")) {
appEnvironment?.navigationCoordinator.router.select(.sources)
}
#endif
}
}
}