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,11 +726,13 @@ fun LikeIcon(
}
}
if (reactionType != null) {
RenderReactionType(reactionType!!, iconSize, iconFontSize)
Crossfade(targetState = reactionType) {
if (it != null) {
RenderReactionType(it, iconSize, iconFontSize)
} else {
RenderLikeIcon(iconSize, grayTint)
}
}
}
@Composable
@@ -1023,7 +1025,8 @@ private fun ZapIcon(
}
}
if (wasZappedByLoggedInUser) {
Crossfade(targetState = wasZappedByLoggedInUser) {
if (it) {
Icon(
imageVector = Icons.Default.Bolt,
contentDescription = stringResource(R.string.zaps),
@@ -1038,6 +1041,7 @@ private fun ZapIcon(
tint = grayTint
)
}
}
}
@Composable