mirror of
https://github.com/yattee/yattee.git
synced 2026-10-23 21:22:53 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user