Migrates CircularProgresIndicator to the newer version
This commit is contained in:
@@ -1096,13 +1096,14 @@ fun ZapReaction(
|
|||||||
if (zappingProgress > 0.00001 && zappingProgress < 0.99999) {
|
if (zappingProgress > 0.00001 && zappingProgress < 0.99999) {
|
||||||
Spacer(ModifierWidth3dp)
|
Spacer(ModifierWidth3dp)
|
||||||
|
|
||||||
|
val animatedProgress by animateFloatAsState(
|
||||||
|
targetValue = zappingProgress,
|
||||||
|
animationSpec = ProgressIndicatorDefaults.ProgressAnimationSpec,
|
||||||
|
label = "ZapIconIndicator",
|
||||||
|
)
|
||||||
|
|
||||||
CircularProgressIndicator(
|
CircularProgressIndicator(
|
||||||
progress =
|
progress = { animatedProgress },
|
||||||
animateFloatAsState(
|
|
||||||
targetValue = zappingProgress,
|
|
||||||
animationSpec = ProgressIndicatorDefaults.ProgressAnimationSpec,
|
|
||||||
label = "ZapIconIndicator",
|
|
||||||
).value,
|
|
||||||
modifier = remember { Modifier.size(animationSize) },
|
modifier = remember { Modifier.size(animationSize) },
|
||||||
strokeWidth = 2.dp,
|
strokeWidth = 2.dp,
|
||||||
)
|
)
|
||||||
|
|||||||
+7
-6
@@ -531,13 +531,14 @@ fun ZapDVMButton(
|
|||||||
if (zappingProgress > 0.00001 && zappingProgress < 0.99999) {
|
if (zappingProgress > 0.00001 && zappingProgress < 0.99999) {
|
||||||
Spacer(ModifierWidth3dp)
|
Spacer(ModifierWidth3dp)
|
||||||
|
|
||||||
|
val animatedProgress by animateFloatAsState(
|
||||||
|
targetValue = zappingProgress,
|
||||||
|
animationSpec = ProgressIndicatorDefaults.ProgressAnimationSpec,
|
||||||
|
label = "ZapIconIndicator",
|
||||||
|
)
|
||||||
|
|
||||||
CircularProgressIndicator(
|
CircularProgressIndicator(
|
||||||
progress =
|
progress = { animatedProgress },
|
||||||
animateFloatAsState(
|
|
||||||
targetValue = zappingProgress,
|
|
||||||
animationSpec = ProgressIndicatorDefaults.ProgressAnimationSpec,
|
|
||||||
label = "ZapIconIndicator",
|
|
||||||
).value,
|
|
||||||
modifier = remember { Modifier.size(animationSize) },
|
modifier = remember { Modifier.size(animationSize) },
|
||||||
strokeWidth = 2.dp,
|
strokeWidth = 2.dp,
|
||||||
color = grayTint,
|
color = grayTint,
|
||||||
|
|||||||
Reference in New Issue
Block a user