Skip to content

Commit a23ffab

Browse files
author
AlirezaJoon
committed
fix: add label to animations for fixing lint issue
1 parent 0a20cb7 commit a23ffab

File tree

1 file changed

+3
-1
lines changed
  • core/designsystem/src/main/java/com/google/samples/apps/nowinandroid/core/designsystem/component

1 file changed

+3
-1
lines changed

core/designsystem/src/main/java/com/google/samples/apps/nowinandroid/core/designsystem/component/LoadingWheel.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ fun NiaLoadingWheel(
5555
contentDesc: String,
5656
modifier: Modifier = Modifier,
5757
) {
58-
val infiniteTransition = rememberInfiniteTransition()
58+
val infiniteTransition = rememberInfiniteTransition(label = "wheel transition")
5959

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

8788
// Specifies the color animation for the base-to-progress line color change
@@ -100,6 +101,7 @@ fun NiaLoadingWheel(
100101
repeatMode = RepeatMode.Restart,
101102
initialStartOffset = StartOffset(ROTATION_TIME / NUM_OF_LINES / 2 * index),
102103
),
104+
label = "wheel color animation",
103105
)
104106
}
105107

0 commit comments

Comments
 (0)