From fced75fce127183d09a4c8231fc823c7c273e401 Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Wed, 25 Feb 2026 22:37:01 +0100 Subject: [PATCH] Hide theme and accent color settings on tvOS These settings don't work well on Apple TV, so exclude the ThemeSection, AccentColorSection, and the .preferredColorScheme/.tint modifiers from tvOS builds. --- Yattee/Views/Settings/AppearanceSettingsView.swift | 4 ++++ Yattee/YatteeApp.swift | 2 ++ 2 files changed, 6 insertions(+) diff --git a/Yattee/Views/Settings/AppearanceSettingsView.swift b/Yattee/Views/Settings/AppearanceSettingsView.swift index 13c9ba51..a63c5c75 100644 --- a/Yattee/Views/Settings/AppearanceSettingsView.swift +++ b/Yattee/Views/Settings/AppearanceSettingsView.swift @@ -14,7 +14,9 @@ struct AppearanceSettingsView: View { Form { if let settings = appEnvironment?.settingsManager { // Theme section + #if !os(tvOS) ThemeSection(settings: settings) + #endif // App icon section (iOS only) #if os(iOS) @@ -22,7 +24,9 @@ struct AppearanceSettingsView: View { #endif // Accent color section + #if !os(tvOS) AccentColorSection(settings: settings) + #endif // List style section ListStyleSection(settings: settings) diff --git a/Yattee/YatteeApp.swift b/Yattee/YatteeApp.swift index eab00fc2..46e02794 100644 --- a/Yattee/YatteeApp.swift +++ b/Yattee/YatteeApp.swift @@ -60,8 +60,10 @@ struct YatteeApp: App { WindowGroup { ContentView() .appEnvironment(appEnvironment) + #if !os(tvOS) .preferredColorScheme(appEnvironment.settingsManager.theme.colorScheme) .tint(appEnvironment.settingsManager.accentColor.color) + #endif #if os(macOS) // Required on the view to prevent new windows on URL open .handlesExternalEvents(preferring: ["*"], allowing: ["*"])