Skip to content

Commit bae5fb5

Browse files
committed
Wrap map creation in remember block
1 parent 383eb7b commit bae5fb5

File tree

1 file changed

+8
-6
lines changed
  • multiplatform-markdown-renderer/src/commonMain/kotlin/com/mikepenz/markdown/compose/elements

1 file changed

+8
-6
lines changed

multiplatform-markdown-renderer/src/commonMain/kotlin/com/mikepenz/markdown/compose/elements/MarkdownText.kt

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -145,13 +145,15 @@ fun MarkdownText(
145145
if (placeholderState.animate) animations.animateTextSize(it) else it
146146
},
147147
style = style,
148-
inlineContent = inlineContent.inlineContent + mapOf(
149-
MARKDOWN_TAG_IMAGE_URL to createImageInlineTextContent(
150-
placeholderState,
151-
transformer,
152-
imageState
148+
inlineContent = remember {
149+
inlineContent.inlineContent + mapOf(
150+
MARKDOWN_TAG_IMAGE_URL to createImageInlineTextContent(
151+
placeholderState,
152+
transformer,
153+
imageState
154+
)
153155
)
154-
),
156+
},
155157
onTextLayout = {
156158
layoutResult.value = it
157159
onTextLayout?.invoke(it, baseColor)

0 commit comments

Comments
 (0)