diff --git a/app/src/main/java/cloud/pablos/overload/ui/views/DayViewProgress.kt b/app/src/main/java/cloud/pablos/overload/ui/views/DayViewProgress.kt index 92a39d6..aaadd5a 100644 --- a/app/src/main/java/cloud/pablos/overload/ui/views/DayViewProgress.kt +++ b/app/src/main/java/cloud/pablos/overload/ui/views/DayViewProgress.kt @@ -66,7 +66,7 @@ fun DayViewProgress( count += Duration.between(parsedStartTime, parsedEndTime).toMillis() } - duration = count + duration = count.coerceIn(Long.MIN_VALUE, Long.MAX_VALUE) // Animation val transition = updateTransition(targetState = duration, label = "progress") @@ -82,7 +82,7 @@ fun DayViewProgress( 360f - ((360f / goal) * (goal - remTime)) } - calculatedProgress.coerceAtMost(360f) + calculatedProgress.coerceIn(0f, 360f) } // Color