fix(kobo): properly store total progression on state update

This commit is contained in:
Gauthier Roebroeck 2024-09-02 16:39:09 +08:00
parent c3fc37a5da
commit fcde9c9376

View file

@ -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
newProgression.locator.copy(type = matchedPosition.type),
// 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)),
)
}
}