File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
lottie-compose/src/main/java/com/airbnb/lottie/compose Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -298,6 +298,9 @@ private class LottieAnimatableImpl : LottieAnimatable {
298
298
}
299
299
}
300
300
301
+ /* *
302
+ * @return whether or not the animation should continue after this frame.
303
+ */
301
304
private fun onFrame (iterations : Int , frameNanos : Long ): Boolean {
302
305
val composition = composition ? : return true
303
306
val dNanos = if (lastFrameNanos == AnimationConstants .UnspecifiedTime ) 0L else (frameNanos - lastFrameNanos)
@@ -311,7 +314,11 @@ private class LottieAnimatableImpl : LottieAnimatable {
311
314
frameSpeed < 0 -> minProgress - (progressRaw + dProgress)
312
315
else -> progressRaw + dProgress - maxProgress
313
316
}
314
- if (progressPastEndOfIteration < 0f ) {
317
+
318
+ if (minProgress == maxProgress) {
319
+ updateProgress(minProgress)
320
+ return false
321
+ } else if (progressPastEndOfIteration < 0f ) {
315
322
updateProgress(progressRaw.coerceIn(minProgress, maxProgress) + dProgress)
316
323
} else {
317
324
val durationProgress = maxProgress - minProgress
You can’t perform that action at this time.
0 commit comments