fix slider showing seen when skipping to any interval not >90%

This commit is contained in:
686udjie 2025-11-27 23:52:11 +02:00
parent 611646902c
commit 6baa8e658b
4 changed files with 8 additions and 8 deletions

View file

@ -25,7 +25,7 @@ struct CircularProgressBar: View {
.animation(.linear, value: progress) .animation(.linear, value: progress)
let remainingTimePercentage = UserDefaults.standard.object(forKey: "remainingTimePercentage") != nil ? UserDefaults.standard.double(forKey: "remainingTimePercentage") : 90.0 let remainingTimePercentage = UserDefaults.standard.object(forKey: "remainingTimePercentage") != nil ? UserDefaults.standard.double(forKey: "remainingTimePercentage") : 90.0
let threshold = (100.0 - remainingTimePercentage) / 100.0 let threshold = remainingTimePercentage / 100.0
if progress >= threshold { if progress >= threshold {
Image(systemName: "checkmark") Image(systemName: "checkmark")

View file

@ -223,7 +223,7 @@ private extension EpisodeCell {
} }
.tint(.blue) .tint(.blue)
if progress <= remainingTimePercentage { if progress >= remainingTimePercentage / 100.0 {
Button(action: { markAsWatched() }) { Button(action: { markAsWatched() }) {
Label("Watched", systemImage: "checkmark.circle") Label("Watched", systemImage: "checkmark.circle")
} }
@ -325,7 +325,7 @@ private extension EpisodeCell {
var contextMenuContent: some View { var contextMenuContent: some View {
Group { Group {
if progress <= remainingTimePercentage { if progress >= remainingTimePercentage / 100.0 {
Button(action: markAsWatched) { Button(action: markAsWatched) {
Label("Mark Episode as Watched", systemImage: "checkmark.circle") Label("Mark Episode as Watched", systemImage: "checkmark.circle")
} }