Skip to content

Commit

Permalink
fix(ui): fix crash when expanding format list
Browse files Browse the repository at this point in the history
  • Loading branch information
JunkFood02 committed Mar 24, 2024
1 parent 2eab899 commit aa48b1d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .idea/deploymentTargetSelector.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 8 additions & 7 deletions app/src/main/java/com/junkfood/seal/ui/component/FormatItem.kt
Original file line number Diff line number Diff line change
Expand Up @@ -363,18 +363,19 @@ fun FormatItem(
onClick: () -> Unit = {}
) {
val animatedOutlineColor by animateColorAsState(
targetValue = MaterialTheme.colorScheme.run {
if (selected) outlineColor else outlineVariant
}, animationSpec = tween(100)
targetValue = if (selected) outlineColor else MaterialTheme.colorScheme.outlineVariant,
animationSpec = tween(100), label = ""
)


val animatedTitleColor by animateColorAsState(
targetValue = MaterialTheme.colorScheme.run {
if (selected) outlineColor else onSurface
}, animationSpec = tween(100)
if (selected) outlineColor else MaterialTheme.colorScheme.onSurface,
animationSpec = tween(100), label = ""
)

val animatedContainerColor by animateColorAsState(
if (selected) containerColor else MaterialTheme.colorScheme.surface,
animationSpec = tween(100)
animationSpec = tween(100), label = ""
)

Box(modifier = modifier
Expand Down

0 comments on commit aa48b1d

Please sign in to comment.