mirror of
https://github.com/cranci1/Sora.git
synced 2026-03-31 06:48:37 +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
|
|
@ -2021,12 +2021,12 @@ class CustomMediaPlayerViewController: UIViewController, UIGestureRecognizerDele
|
|||
let remainingPercentage = (self.duration - self.currentTimeVal) / self.duration
|
||||
let remainingTimePercentage = UserDefaults.standard.object(forKey: "remainingTimePercentage") != nil ? UserDefaults.standard.double(forKey: "remainingTimePercentage") : 90.0
|
||||
let threshold = (100.0 - remainingTimePercentage) / 100.0
|
||||
|
||||
|
||||
if remainingPercentage <= threshold {
|
||||
if self.aniListID != 0 && !self.aniListUpdatedSuccessfully && !self.aniListUpdateImpossible {
|
||||
self.tryAniListUpdate()
|
||||
}
|
||||
|
||||
|
||||
if let tmdbId = self.tmdbID, tmdbId > 0, !self.traktUpdateSent {
|
||||
self.sendTraktUpdate(tmdbId: tmdbId)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -324,12 +324,12 @@ class VideoPlayerViewController: UIViewController {
|
|||
let remainingPercentage = (duration - currentTime) / duration
|
||||
let remainingTimePercentage = UserDefaults.standard.object(forKey: "remainingTimePercentage") != nil ? UserDefaults.standard.double(forKey: "remainingTimePercentage") : 90.0
|
||||
let threshold = (100.0 - remainingTimePercentage) / 100.0
|
||||
|
||||
|
||||
if remainingPercentage <= threshold {
|
||||
if self.aniListID != 0 && !self.aniListUpdateSent {
|
||||
self.sendAniListUpdate()
|
||||
}
|
||||
|
||||
|
||||
if let tmdbId = self.tmdbID, tmdbId > 0, !self.traktUpdateSent {
|
||||
self.sendTraktUpdate(tmdbId: tmdbId)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,8 +25,8 @@ struct CircularProgressBar: View {
|
|||
.animation(.linear, value: progress)
|
||||
|
||||
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 {
|
||||
Image(systemName: "checkmark")
|
||||
.font(.system(size: 12))
|
||||
|
|
|
|||
|
|
@ -223,7 +223,7 @@ private extension EpisodeCell {
|
|||
}
|
||||
.tint(.blue)
|
||||
|
||||
if progress <= remainingTimePercentage {
|
||||
if progress >= remainingTimePercentage / 100.0 {
|
||||
Button(action: { markAsWatched() }) {
|
||||
Label("Watched", systemImage: "checkmark.circle")
|
||||
}
|
||||
|
|
@ -325,7 +325,7 @@ private extension EpisodeCell {
|
|||
|
||||
var contextMenuContent: some View {
|
||||
Group {
|
||||
if progress <= remainingTimePercentage {
|
||||
if progress >= remainingTimePercentage / 100.0 {
|
||||
Button(action: markAsWatched) {
|
||||
Label("Mark Episode as Watched", systemImage: "checkmark.circle")
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue