Skip to content

Commit

Permalink
- potential crash fix #41 by @pabloscloud (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
pabloscloud and pablo03v committed Oct 21, 2023
1 parent 50d44ed commit 71490c7
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -82,7 +82,7 @@ fun DayViewProgress(
360f - ((360f / goal) * (goal - remTime))
}

calculatedProgress.coerceAtMost(360f)
calculatedProgress.coerceIn(0f, 360f)
}

// Color
Expand Down

0 comments on commit 71490c7

Please sign in to comment.