mirror of
https://github.com/yattee/yattee.git
synced 2026-10-23 05:02:53 +00:00
Give the empty tvOS translators screen a focusable Done button
If the bundled translator list fails to load the screen is a bare ContentUnavailableView, leaving the tvOS remote nothing to focus.
This commit is contained in:
@@ -9,6 +9,9 @@ import NukeUI
|
||||
import SwiftUI
|
||||
|
||||
struct TranslationContributorsView: View {
|
||||
#if os(tvOS)
|
||||
@Environment(\.dismiss) private var dismiss
|
||||
#endif
|
||||
@State private var contributors: [TranslationContributor] = []
|
||||
|
||||
var body: some View {
|
||||
@@ -30,6 +33,13 @@ struct TranslationContributorsView: View {
|
||||
if contributors.isEmpty {
|
||||
ContentUnavailableView {
|
||||
Label(String(localized: "settings.translators.empty"), systemImage: "globe")
|
||||
} actions: {
|
||||
#if os(tvOS)
|
||||
// Nothing else here is focusable; without it the remote is stuck.
|
||||
Button(String(localized: "common.done")) {
|
||||
dismiss()
|
||||
}
|
||||
#endif
|
||||
}
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user