Add tvOS setting for video click behavior

This commit is contained in:
Arkadiusz Fal
2026-04-16 04:26:48 +02:00
parent fb2db35fe8
commit 9b55ee7127
5 changed files with 78 additions and 1 deletions

View File

@@ -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.