Crossfades changes in Reactions and Zaps

This commit is contained in:
Vitor Pamplona
2023-06-25 19:17:48 -04:00
parent b4a81c137c
commit d7bce4414d
@@ -726,12 +726,14 @@ fun LikeIcon(
} }
} }
if (reactionType != null) { Crossfade(targetState = reactionType) {
RenderReactionType(reactionType!!, iconSize, iconFontSize) if (it != null) {
RenderReactionType(it, iconSize, iconFontSize)
} else { } else {
RenderLikeIcon(iconSize, grayTint) RenderLikeIcon(iconSize, grayTint)
} }
} }
}
@Composable @Composable
private fun RenderLikeIcon( private fun RenderLikeIcon(
@@ -1023,7 +1025,8 @@ private fun ZapIcon(
} }
} }
if (wasZappedByLoggedInUser) { Crossfade(targetState = wasZappedByLoggedInUser) {
if (it) {
Icon( Icon(
imageVector = Icons.Default.Bolt, imageVector = Icons.Default.Bolt,
contentDescription = stringResource(R.string.zaps), contentDescription = stringResource(R.string.zaps),
@@ -1039,6 +1042,7 @@ private fun ZapIcon(
) )
} }
} }
}
@Composable @Composable
private fun ZapAmountText( private fun ZapAmountText(