Give the empty tvOS legacy import screen a focusable Done button

The toolbar Done is iOS/macOS only, so after the last legacy account or
source was imported or removed the tvOS screen had nothing focusable and
the remote was stuck.
This commit is contained in:
Arkadiusz Fal
2026-10-15 23:57:50 +02:00
parent 2c3216e048
commit d5b5b3262d

View File

@@ -134,11 +134,20 @@ struct LegacyAccountsImportView: View {
}
private var emptyState: some View {
ContentUnavailableView(
String(localized: "migration.accounts.empty.title"),
systemImage: "person.badge.key",
description: Text(String(localized: "migration.accounts.empty.description"))
)
ContentUnavailableView {
Label(String(localized: "migration.accounts.empty.title"), systemImage: "person.badge.key")
} description: {
Text(String(localized: "migration.accounts.empty.description"))
} actions: {
#if os(tvOS)
// The toolbar Done is iOS/macOS only. Once the last item is
// imported or removed nothing else is focusable, and the remote
// would be stuck — in the full screen cover and when pushed alike.
Button(String(localized: "common.done")) {
dismiss()
}
#endif
}
.frame(maxWidth: .infinity, maxHeight: .infinity)
}