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.
This commit is contained in:
Arkadiusz Fal
2026-02-25 22:37:01 +01:00
parent 0fdac499bb
commit fced75fce1
2 changed files with 6 additions and 0 deletions

View File

@@ -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: ["*"])