Skip to content

Commit

Permalink
fix(kobo): use the total progression sent by Kobo
Browse files Browse the repository at this point in the history
  • Loading branch information
gotson committed Sep 2, 2024
1 parent 20e7c29 commit be37127
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -494,8 +494,8 @@ class BookLifecycle(
newProgression.modified.toLocalDateTime().toCurrentTimeZone(),
newProgression.device.id,
newProgression.device.name,
// use the type we have instead of the one provided, as well as the total progression we computed
newProgression.locator.copy(type = matchedPosition.type, locations = newProgression.locator.locations?.copy(totalProgression = totalProgression)),
// use the type we have instead of the one provided
newProgression.locator.copy(type = matchedPosition.type),
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,7 @@ class KoboController(
locations =
R2Locator.Location(
progression = koboUpdate.currentBookmark.contentSourceProgressPercent / 100,
totalProgression = koboUpdate.currentBookmark.progressPercent?.div(100),
),
)
},
Expand Down

0 comments on commit be37127

Please sign in to comment.