mirror of
https://github.com/yattee/yattee.git
synced 2026-05-14 19:35:02 +00:00
Add tvOS setting for video click behavior
This commit is contained in:
@@ -506,6 +506,26 @@ extension SettingsManager {
|
||||
}
|
||||
#endif
|
||||
|
||||
// MARK: - Video Tap Action (tvOS only)
|
||||
|
||||
#if os(tvOS)
|
||||
/// Action to perform when clicking a video cell on tvOS. Default is openInfo.
|
||||
var tvOSVideoTapAction: VideoTapAction {
|
||||
get {
|
||||
if let cached = _tvOSVideoTapAction { return cached }
|
||||
guard let rawValue = localDefaults.string(forKey: "tvOSVideoTapAction"),
|
||||
let action = VideoTapAction(rawValue: rawValue) else {
|
||||
return .openInfo
|
||||
}
|
||||
return action
|
||||
}
|
||||
set {
|
||||
_tvOSVideoTapAction = newValue
|
||||
localDefaults.set(newValue.rawValue, forKey: "tvOSVideoTapAction")
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// MARK: - Onboarding
|
||||
|
||||
/// Whether onboarding has been completed on this device.
|
||||
|
||||
@@ -190,6 +190,11 @@ final class SettingsManager {
|
||||
var _textAreaTapAction: VideoTapAction?
|
||||
#endif
|
||||
|
||||
// Video tap action (tvOS only)
|
||||
#if os(tvOS)
|
||||
var _tvOSVideoTapAction: VideoTapAction?
|
||||
#endif
|
||||
|
||||
// Player Controls settings (controlsButtonSize moved to preset)
|
||||
|
||||
// Appearance settings
|
||||
@@ -500,6 +505,9 @@ final class SettingsManager {
|
||||
_thumbnailTapAction = nil
|
||||
_textAreaTapAction = nil
|
||||
#endif
|
||||
#if os(tvOS)
|
||||
_tvOSVideoTapAction = nil
|
||||
#endif
|
||||
_listStyle = nil
|
||||
#if os(iOS)
|
||||
_appIcon = nil
|
||||
|
||||
Reference in New Issue
Block a user