From f804cc152174e32f648ec9969b2994a4a9d91ab9 Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Thu, 23 Apr 2026 07:34:31 +0200 Subject: [PATCH] Rename YouTube Enhancements settings to Integrations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also swap the icon to puzzlepiece.extension, which better conveys that this section houses third-party service hookups (SponsorBlock, Return YouTube Dislike, DeArrow, short-link resolution) rather than being YouTube-specific. Hide the Resolve Short Links toggle on tvOS — there's no way to tap inline description links or reach a system browser there — and tighten the openInSystemBrowser platform guards so the iOS-only UIApplication path isn't compiled on tvOS. --- Yattee/Localizable.xcstrings | 2 +- Yattee/Utilities/DescriptionText.swift | 6 ++++-- Yattee/Views/Components/ResolvedLinkPromptsModifier.swift | 4 ++-- Yattee/Views/Settings/SettingsView.swift | 8 ++++---- .../Views/Settings/YouTubeEnhancementsSettingsView.swift | 4 ++++ 5 files changed, 15 insertions(+), 9 deletions(-) diff --git a/Yattee/Localizable.xcstrings b/Yattee/Localizable.xcstrings index ae336c2e..22bb4767 100644 --- a/Yattee/Localizable.xcstrings +++ b/Yattee/Localizable.xcstrings @@ -14523,7 +14523,7 @@ "en" : { "stringUnit" : { "state" : "translated", - "value" : "YouTube Enhancements" + "value" : "Integrations" } } } diff --git a/Yattee/Utilities/DescriptionText.swift b/Yattee/Utilities/DescriptionText.swift index 9f57d387..4fc6d231 100644 --- a/Yattee/Utilities/DescriptionText.swift +++ b/Yattee/Utilities/DescriptionText.swift @@ -98,11 +98,13 @@ enum DescriptionText { /// fails or the destination isn't a URL the app can handle. @MainActor private func openInSystemBrowser(_ url: URL) { - #if canImport(UIKit) && !os(watchOS) + #if os(iOS) UIApplication.shared.open(url) - #elseif canImport(AppKit) + #elseif os(macOS) NSWorkspace.shared.open(url) #endif + // tvOS has no system browser and no way to tap description links in the + // first place — this path is unreachable there. } extension View { diff --git a/Yattee/Views/Components/ResolvedLinkPromptsModifier.swift b/Yattee/Views/Components/ResolvedLinkPromptsModifier.swift index abb599d5..0048c2fc 100644 --- a/Yattee/Views/Components/ResolvedLinkPromptsModifier.swift +++ b/Yattee/Views/Components/ResolvedLinkPromptsModifier.swift @@ -96,9 +96,9 @@ struct ResolvedLinkPromptsModifier: ViewModifier { @MainActor private func openInSystemBrowser(_ url: URL) { - #if canImport(UIKit) && !os(watchOS) + #if os(iOS) UIApplication.shared.open(url) - #elseif canImport(AppKit) + #elseif os(macOS) NSWorkspace.shared.open(url) #endif } diff --git a/Yattee/Views/Settings/SettingsView.swift b/Yattee/Views/Settings/SettingsView.swift index c3a9b50a..1ffb8936 100644 --- a/Yattee/Views/Settings/SettingsView.swift +++ b/Yattee/Views/Settings/SettingsView.swift @@ -166,8 +166,8 @@ struct SettingsView: View { } if appEnvironment.instancesManager.enabledInstances.contains(where: \.isYouTubeInstance) { - NavigationLink { TVSidebarDetailContainer(systemImage: "play.rectangle", title: String(localized: "settings.youtubeEnhancements.title")) { YouTubeEnhancementsSettingsView() } } label: { - Label(String(localized: "settings.youtubeEnhancements.title"), systemImage: "play.rectangle") + NavigationLink { TVSidebarDetailContainer(systemImage: "puzzlepiece.extension", title: String(localized: "settings.youtubeEnhancements.title")) { YouTubeEnhancementsSettingsView() } } label: { + Label(String(localized: "settings.youtubeEnhancements.title"), systemImage: "puzzlepiece.extension") } } @@ -302,7 +302,7 @@ struct SettingsView: View { NavigationLink { YouTubeEnhancementsSettingsView() } label: { - Label(String(localized: "settings.youtubeEnhancements.title"), systemImage: "play.rectangle") + Label(String(localized: "settings.youtubeEnhancements.title"), systemImage: "puzzlepiece.extension") } } } @@ -402,7 +402,7 @@ enum SettingsSection: String, CaseIterable, Identifiable { case .notifications: return "bell.badge" case .downloads: return "arrow.down.circle" case .privacy: return "hand.raised" - case .youtubeEnhancements: return "play.rectangle" + case .youtubeEnhancements: return "puzzlepiece.extension" case .advanced: return "gearshape.2" case .about: return "info.circle" } diff --git a/Yattee/Views/Settings/YouTubeEnhancementsSettingsView.swift b/Yattee/Views/Settings/YouTubeEnhancementsSettingsView.swift index 41ce5d06..c91716ce 100644 --- a/Yattee/Views/Settings/YouTubeEnhancementsSettingsView.swift +++ b/Yattee/Views/Settings/YouTubeEnhancementsSettingsView.swift @@ -16,7 +16,11 @@ struct YouTubeEnhancementsSettingsView: View { SponsorBlockSection(settings: settings) ReturnYouTubeDislikeSection(settings: settings) DeArrowSection(settings: settings) + #if !os(tvOS) + // tvOS has no in-description link tapping or system browser, + // so short-link resolution would have nothing to act on. ResolveShortLinksSection(settings: settings) + #endif } } #if !os(tvOS)