mirror of
https://github.com/cranci1/Sora.git
synced 2026-04-27 19:33:00 +00:00
fix slider showing seen when skipping to any interval not >90%
This commit is contained in:
parent
611646902c
commit
6baa8e658b
4 changed files with 8 additions and 8 deletions
|
|
@ -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")
|
||||||
|
|
|
||||||
|
|
@ -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")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue