|
@@ -99,28 +99,6 @@ fun HistoryContent(
|
|
|
|
|
|
val scrollState = rememberLazyListState()
|
|
|
|
|
|
- val transition = rememberInfiniteTransition()
|
|
|
-
|
|
|
- val translateAnimation = transition.animateFloat(
|
|
|
- initialValue = 0f,
|
|
|
- targetValue = 1000f,
|
|
|
- animationSpec = infiniteRepeatable(
|
|
|
- animation = tween(
|
|
|
- durationMillis = 1000,
|
|
|
- easing = LinearEasing,
|
|
|
- ),
|
|
|
- ),
|
|
|
- )
|
|
|
-
|
|
|
- val brush = linearGradient(
|
|
|
- colors = shimmerGradient,
|
|
|
- start = Offset(0f, 0f),
|
|
|
- end = Offset(
|
|
|
- x = translateAnimation.value,
|
|
|
- y = 00f,
|
|
|
- ),
|
|
|
- )
|
|
|
-
|
|
|
ScrollbarLazyColumn(
|
|
|
modifier = Modifier
|
|
|
.nestedScroll(nestedScroll),
|
|
@@ -149,6 +127,28 @@ fun HistoryContent(
|
|
|
)
|
|
|
}
|
|
|
null -> {
|
|
|
+ val transition = rememberInfiniteTransition()
|
|
|
+ val translateAnimation = transition.animateFloat(
|
|
|
+ initialValue = 0f,
|
|
|
+ targetValue = 1000f,
|
|
|
+ animationSpec = infiniteRepeatable(
|
|
|
+ animation = tween(
|
|
|
+ durationMillis = 1000,
|
|
|
+ easing = LinearEasing,
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ )
|
|
|
+
|
|
|
+ val brush = remember {
|
|
|
+ linearGradient(
|
|
|
+ colors = shimmerGradient,
|
|
|
+ start = Offset(0f, 0f),
|
|
|
+ end = Offset(
|
|
|
+ x = translateAnimation.value,
|
|
|
+ y = 00f,
|
|
|
+ ),
|
|
|
+ )
|
|
|
+ }
|
|
|
HistoryItemShimmer(brush = brush)
|
|
|
}
|
|
|
}
|