mirror of
https://github.com/yattee/yattee.git
synced 2025-08-05 02:04:07 +00:00
Add setting for toggle video watch status
This commit is contained in:
@@ -8,21 +8,28 @@ struct WatchView: View {
|
||||
var duration: Double
|
||||
|
||||
@Default(.watchedVideoBadgeColor) private var watchedVideoBadgeColor
|
||||
@Default(.showToggleWatchedStatusButton) private var showToggleWatchedStatusButton
|
||||
|
||||
var backgroundContext = PersistenceController.shared.container.newBackgroundContext()
|
||||
|
||||
var body: some View {
|
||||
#if os(tvOS)
|
||||
if showToggleWatchedStatusButton {
|
||||
#if os(tvOS)
|
||||
if finished {
|
||||
image
|
||||
}
|
||||
#else
|
||||
Button(action: toggleWatch) {
|
||||
image
|
||||
}
|
||||
.opacity(finished ? 1 : 0.4)
|
||||
.buttonStyle(.plain)
|
||||
#endif
|
||||
} else {
|
||||
if finished {
|
||||
image
|
||||
}
|
||||
#else
|
||||
Button(action: toggleWatch) {
|
||||
image
|
||||
}
|
||||
.opacity(finished ? 1 : 0.4)
|
||||
.buttonStyle(.plain)
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
var image: some View {
|
||||
|
Reference in New Issue
Block a user