Keep the system accent color on tvOS

Views reading resolvedAccentColor directly (comment links, home
shortcuts, bookmarks, player panels) picked up accent colors synced
from iOS via iCloud. tvOS now always resolves to the system default.
This commit is contained in:
Arkadiusz Fal
2026-09-18 23:59:54 +02:00
parent 17aa723cd0
commit 629561f057

View File

@@ -126,6 +126,11 @@ extension SettingsManager {
/// dynamic platform color that resolves per trait environment, so all consumers
/// (root tint and direct readers) adapt to light/dark automatically.
var resolvedAccentColor: Color {
#if os(tvOS)
// tvOS keeps the system default accent; user-picked colors (possibly
// synced from iOS via iCloud) must never override it.
return .accentColor
#else
let light = resolvedLightAccentColor
guard useSeparateDarkAccentColor else { return light }
let dark = resolvedDarkAccentColor
@@ -139,6 +144,7 @@ extension SettingsManager {
UIColor(traits.userInterfaceStyle == .dark ? dark : light)
})
#endif
#endif
}
// MARK: - App Icon Settings