Hide non-working external links in tvOS settings

tvOS cannot open URLs in a browser, so the Community section
(GitHub/Discord) is omitted and Acknowledgements dependencies
render as plain text rather than tappable buttons.
This commit is contained in:
Arkadiusz Fal
2026-04-16 05:46:30 +02:00
parent f2748bead6
commit a6d1c840f9
2 changed files with 7 additions and 0 deletions

View File

@@ -26,7 +26,11 @@ struct AcknowledgementsView: View {
#endif
}
@ViewBuilder
private func dependencyLink(_ name: String, url: String) -> some View {
#if os(tvOS)
Text(name)
#else
Button {
if let url = URL(string: url) {
openURL(url)
@@ -39,6 +43,7 @@ struct AcknowledgementsView: View {
.foregroundStyle(.secondary)
}
}
#endif
}
}