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