mirror of
https://github.com/yattee/yattee.git
synced 2026-05-13 19:05:03 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user