Skip to content

Commit

Permalink
[Compose] Swap Modifier order (#1765)
Browse files Browse the repository at this point in the history
This makes LottieAnimation modifiers behave as they are supposed to given the Compose guidelines

Fixes #1761
  • Loading branch information
gpeal authored Mar 22, 2021
1 parent dcdcdec commit f2cd59c
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,8 @@ fun LottieAnimation(
if (composition == null || composition.duration == 0f) return

Canvas(
modifier = Modifier
modifier = modifier
.maintainAspectRatio(composition)
.then(modifier)
) {
drawIntoCanvas { canvas ->
drawable.progress = state.progress
Expand Down

0 comments on commit f2cd59c

Please sign in to comment.