mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 16:10:00 +00:00
Fix chevron rotation issue.
This commit is contained in:
+2
-6
@@ -241,7 +241,7 @@ private fun ColumnScope.MultiAccountSection(
|
|||||||
}
|
}
|
||||||
// Animate the chevron icon to rotate when the section is expanded/collapsed
|
// Animate the chevron icon to rotate when the section is expanded/collapsed
|
||||||
val rotation: Float by animateFloatAsState(
|
val rotation: Float by animateFloatAsState(
|
||||||
targetValue = if (state.isOtherAccountsSectionExpanded) 180f else 0f,
|
targetValue = if (state.isOtherAccountsSectionExpanded) -180f else 0f,
|
||||||
animationSpec = tween(
|
animationSpec = tween(
|
||||||
delayMillis = 0,
|
delayMillis = 0,
|
||||||
durationMillis = 300,
|
durationMillis = 300,
|
||||||
@@ -250,11 +250,7 @@ private fun ColumnScope.MultiAccountSection(
|
|||||||
)
|
)
|
||||||
Icon(
|
Icon(
|
||||||
modifier = Modifier.rotate(rotation),
|
modifier = Modifier.rotate(rotation),
|
||||||
imageVector = if (state.isOtherAccountsSectionExpanded) {
|
imageVector = CompoundIcons.ChevronDown(),
|
||||||
CompoundIcons.ChevronUp()
|
|
||||||
} else {
|
|
||||||
CompoundIcons.ChevronDown()
|
|
||||||
},
|
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user