From a6d1c840f92a9baadf68c622d77505d25d0155bc Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Thu, 16 Apr 2026 05:46:30 +0200 Subject: [PATCH] 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. --- Yattee/Views/Settings/AboutView.swift | 2 ++ Yattee/Views/Settings/AcknowledgementsView.swift | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/Yattee/Views/Settings/AboutView.swift b/Yattee/Views/Settings/AboutView.swift index d829d230..558111c7 100644 --- a/Yattee/Views/Settings/AboutView.swift +++ b/Yattee/Views/Settings/AboutView.swift @@ -13,12 +13,14 @@ struct AboutView: View { var body: some View { Form { + #if !os(tvOS) Section { communityLink("GitHub", icon: "github", url: "https://github.com/yattee/yattee") communityLink("Discord", icon: "discord", url: "https://yattee.stream/discord") } header: { Text(String(localized: "settings.about.community")) } + #endif Section { NavigationLink { diff --git a/Yattee/Views/Settings/AcknowledgementsView.swift b/Yattee/Views/Settings/AcknowledgementsView.swift index 3f520164..0a853962 100644 --- a/Yattee/Views/Settings/AcknowledgementsView.swift +++ b/Yattee/Views/Settings/AcknowledgementsView.swift @@ -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 } }