Crossfades changes in Reactions and Zaps
This commit is contained in:
@@ -726,12 +726,14 @@ fun LikeIcon(
|
||||
}
|
||||
}
|
||||
|
||||
if (reactionType != null) {
|
||||
RenderReactionType(reactionType!!, iconSize, iconFontSize)
|
||||
Crossfade(targetState = reactionType) {
|
||||
if (it != null) {
|
||||
RenderReactionType(it, iconSize, iconFontSize)
|
||||
} else {
|
||||
RenderLikeIcon(iconSize, grayTint)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun RenderLikeIcon(
|
||||
@@ -1023,7 +1025,8 @@ private fun ZapIcon(
|
||||
}
|
||||
}
|
||||
|
||||
if (wasZappedByLoggedInUser) {
|
||||
Crossfade(targetState = wasZappedByLoggedInUser) {
|
||||
if (it) {
|
||||
Icon(
|
||||
imageVector = Icons.Default.Bolt,
|
||||
contentDescription = stringResource(R.string.zaps),
|
||||
@@ -1039,6 +1042,7 @@ private fun ZapIcon(
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun ZapAmountText(
|
||||
|
||||
Reference in New Issue
Block a user