Skip to content

Commit

Permalink
Merge pull request #884 from alizera/fix_animation_label
Browse files Browse the repository at this point in the history
fix: add label to animations for fixing lint issue
  • Loading branch information
tunjid authored Aug 9, 2023
2 parents 0a20cb7 + a23ffab commit d685f46
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ fun NiaLoadingWheel(
contentDesc: String,
modifier: Modifier = Modifier,
) {
val infiniteTransition = rememberInfiniteTransition()
val infiniteTransition = rememberInfiniteTransition(label = "wheel transition")

// Specifies the float animation for slowly drawing out the lines on entering
val startValue = if (LocalInspectionMode.current) 0F else 1F
Expand All @@ -82,6 +82,7 @@ fun NiaLoadingWheel(
animationSpec = infiniteRepeatable(
animation = tween(durationMillis = ROTATION_TIME, easing = LinearEasing),
),
label = "wheel rotation animation",
)

// Specifies the color animation for the base-to-progress line color change
Expand All @@ -100,6 +101,7 @@ fun NiaLoadingWheel(
repeatMode = RepeatMode.Restart,
initialStartOffset = StartOffset(ROTATION_TIME / NUM_OF_LINES / 2 * index),
),
label = "wheel color animation",
)
}

Expand Down

0 comments on commit d685f46

Please sign in to comment.