Skip to content

Commit

Permalink
Avoid floating point precision issues when converting scores
Browse files Browse the repository at this point in the history
Fixes #10343
Maybe we'll finally migrate off of those legacy models some day...
  • Loading branch information
arkon committed Jan 7, 2024
1 parent 7d6e1bd commit f60782f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/src/main/java/eu/kanade/domain/track/model/Track.kt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ fun DbTrack.toDomainTrack(idRequired: Boolean = true): Track? {
lastChapterRead = last_chapter_read.toDouble(),
totalChapters = total_chapters.toLong(),
status = status.toLong(),
score = score.toDouble(),
// Jank workaround due to precision issues while converting
// See https://github.com/tachiyomiorg/tachiyomi/issues/10343
score = score.toString().toDouble(),
remoteUrl = tracking_url,
startDate = started_reading_date,
finishDate = finished_reading_date,
Expand Down

0 comments on commit f60782f

Please sign in to comment.