mirror of
https://github.com/yattee/yattee.git
synced 2026-05-12 02:17:46 +00:00
Force plain list style on tvOS and hide setting from appearance
Inset/grouped list style doesn't work well with tvOS focus effects. Always return .plain on tvOS and hide the list style picker from appearance settings.
This commit is contained in:
@@ -208,6 +208,9 @@ extension SettingsManager {
|
|||||||
/// Default is plain. Synced per-platform via iCloud.
|
/// Default is plain. Synced per-platform via iCloud.
|
||||||
var listStyle: VideoListStyle {
|
var listStyle: VideoListStyle {
|
||||||
get {
|
get {
|
||||||
|
#if os(tvOS)
|
||||||
|
return .plain
|
||||||
|
#else
|
||||||
if let cached = _listStyle { return cached }
|
if let cached = _listStyle { return cached }
|
||||||
guard let rawValue = string(for: .listStyle),
|
guard let rawValue = string(for: .listStyle),
|
||||||
let style = VideoListStyle(rawValue: rawValue) else {
|
let style = VideoListStyle(rawValue: rawValue) else {
|
||||||
@@ -215,6 +218,7 @@ extension SettingsManager {
|
|||||||
}
|
}
|
||||||
_listStyle = style
|
_listStyle = style
|
||||||
return style
|
return style
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
set {
|
set {
|
||||||
_listStyle = newValue
|
_listStyle = newValue
|
||||||
|
|||||||
@@ -29,7 +29,9 @@ struct AppearanceSettingsView: View {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// List style section
|
// List style section
|
||||||
|
#if !os(tvOS)
|
||||||
ListStyleSection(settings: settings)
|
ListStyleSection(settings: settings)
|
||||||
|
#endif
|
||||||
|
|
||||||
// Thumbnail section
|
// Thumbnail section
|
||||||
ThumbnailSection(settings: settings)
|
ThumbnailSection(settings: settings)
|
||||||
|
|||||||
Reference in New Issue
Block a user