Skip to content

Commit 464cf7a

Browse files
committed
fix: use figma loading animation timing
1 parent 337600b commit 464cf7a

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

app/src/main/java/to/bitkit/ui/sheets/hardware/HwSearchingSheet.kt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ import to.bitkit.ui.utils.withAccent
3838
private val ANIMATION_SIZE = 280.dp
3939
private const val ARROWS_SIZE_RATIO = 0.82f
4040

41+
// Mirrors the Figma "Loading Animation" HW variants: four 90° keyframes, each a 1s linear
42+
// Smart Animate step, so the arrows complete a counter-clockwise turn every 4 seconds.
43+
private const val ARROWS_ROTATION_DURATION_MS = 4000
44+
4145
@Composable
4246
fun HwSearchingSheet(
4347
modifier: Modifier = Modifier,
@@ -98,8 +102,8 @@ private fun SearchingAnimation(modifier: Modifier = Modifier) {
98102
val transition = rememberInfiniteTransition(label = "hw_searching")
99103
val rotation by transition.animateFloat(
100104
initialValue = 0f,
101-
targetValue = 360f,
102-
animationSpec = infiniteRepeatable(tween(durationMillis = 2500, easing = LinearEasing)),
105+
targetValue = -360f,
106+
animationSpec = infiniteRepeatable(tween(durationMillis = ARROWS_ROTATION_DURATION_MS, easing = LinearEasing)),
103107
label = "arrows_rotation",
104108
)
105109

0 commit comments

Comments
 (0)