mirror of
https://github.com/yattee/yattee.git
synced 2026-05-14 03:15:03 +00:00
Make unplayable tvOS media files focusable with unsupported alert
This commit is contained in:
@@ -35,6 +35,17 @@ struct MediaFileTVOSTapButton<Label: View>: View {
|
||||
.buttonStyle(.plain)
|
||||
}
|
||||
}
|
||||
|
||||
/// tvOS-only: wraps an unplayable row in a Button so the focus engine can land on it.
|
||||
struct MediaFileTVOSUnsupportedButton<Label: View>: View {
|
||||
let onTap: () -> Void
|
||||
@ViewBuilder let label: () -> Label
|
||||
|
||||
var body: some View {
|
||||
Button(action: onTap) { label() }
|
||||
.buttonStyle(.plain)
|
||||
}
|
||||
}
|
||||
#else
|
||||
/// iOS/macOS: per-region gesture used by MediaFileRow's icon and text areas.
|
||||
/// Only attaches a gesture when the action differs from `.playVideo`, letting
|
||||
|
||||
Reference in New Issue
Block a user