Skip to content

Commit

Permalink
Only report the progress if it's below 0.
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulWoitaschek committed Jan 5, 2019
1 parent 14cf2e5 commit 245bc80
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ private fun Book.progress(): Float {
val globalPosition = content.position
val totalDuration = content.duration
val progress = globalPosition.toFloat() / totalDuration.toFloat()
if (progress < 0F || progress > 1F) {
if (progress < 0F) {
CrashReporter.logException(AssertionError("Couldn't determine progress for book=$this. Progress is $progress."))
}
return progress.coerceIn(0F, 1F)
Expand Down

0 comments on commit 245bc80

Please sign in to comment.