Fix tvOS soft-lock in import views when no rows are focusable

When all playlists/subscriptions were imported, every row collapsed to a
non-focusable checkmark and the Add All toolbar item disappeared, leaving
the view with no focusable element. The Menu button then closed the app
instead of popping the navigation stack.

Wrap the import destinations in TVSidebarDetailContainer for visual
consistency and add a Done toolbar item (cancellationAction) that is
always present on tvOS, reachable from any list row via swipe-up.
This commit is contained in:
Arkadiusz Fal
2026-05-06 22:17:08 +02:00
parent 38242edf0c
commit 5c7429abf3
4 changed files with 58 additions and 0 deletions

View File

@@ -65,4 +65,20 @@ struct TVSidebarDetailContainer<Content: View, BottomAction: View>: View {
}
}
}
struct TVDismissBottomButton: View {
var title: String = String(localized: "common.done")
var systemImage: String = "chevron.backward"
@Environment(\.dismiss) private var dismiss
var body: some View {
Button {
dismiss()
} label: {
Label(title, systemImage: systemImage)
}
.buttonStyle(TVSettingsButtonStyle())
}
}
#endif