Avoids recompositions
This commit is contained in:
@@ -149,13 +149,16 @@ private fun RenderRegular(
|
|||||||
}
|
}
|
||||||
|
|
||||||
val currentTextStyle = LocalTextStyle.current
|
val currentTextStyle = LocalTextStyle.current
|
||||||
|
val currentTextColor = LocalContentColor.current
|
||||||
|
|
||||||
val textStyle = currentTextStyle.copy(
|
val textStyle = remember(currentTextStyle, currentTextColor) {
|
||||||
|
currentTextStyle.copy(
|
||||||
lineHeight = 1.4.em,
|
lineHeight = 1.4.em,
|
||||||
color = currentTextStyle.color.takeOrElse {
|
color = currentTextStyle.color.takeOrElse {
|
||||||
LocalContentColor.current
|
currentTextColor
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
}
|
||||||
|
|
||||||
MeasureSpaceWidth() { spaceWidth ->
|
MeasureSpaceWidth() { spaceWidth ->
|
||||||
Column() {
|
Column() {
|
||||||
|
|||||||
Reference in New Issue
Block a user