fix: kobo sync only update finished date when one doesn't already exist (#1614)
* fix: only update finished date on kobo sync when an existing date doesn't exist * chore: add unit tests to confirm this is the case
This commit is contained in:
+3
-1
@@ -185,7 +185,9 @@ public class KoboReadingStateService {
|
||||
|
||||
if (progressPercent >= finishedThreshold) {
|
||||
userProgress.setReadStatus(ReadStatus.READ);
|
||||
userProgress.setDateFinished(Instant.now());
|
||||
if (userProgress.getDateFinished() == null) {
|
||||
userProgress.setDateFinished(Instant.now());
|
||||
}
|
||||
} else if (progressPercent >= readingThreshold) {
|
||||
userProgress.setReadStatus(ReadStatus.READING);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user