Remember descriptionAnnotator across composition

Closes #2510

Co-authored-by: Cuong-Tran <16017808+cuong-tran@users.noreply.github.com>
This commit is contained in:
AntsyLich
2025-12-27 01:43:39 +06:00
parent e059190fab
commit 906d6f3cdb
@@ -567,7 +567,9 @@ private fun ColumnScope.MangaContentInfo(
}
}
private fun descriptionAnnotator(loadImages: Boolean, linkStyle: SpanStyle) = markdownAnnotator(
@Composable
private fun descriptionAnnotator(loadImages: Boolean, linkStyle: SpanStyle) = remember(loadImages, linkStyle) {
markdownAnnotator(
annotate = { content, child ->
if (!loadImages && child.type == MarkdownElementTypes.IMAGE) {
val inlineLink = child.findChildOfType(MarkdownElementTypes.INLINE_LINK)
@@ -605,6 +607,7 @@ private fun descriptionAnnotator(loadImages: Boolean, linkStyle: SpanStyle) = ma
eolAsNewLine = true,
),
)
}
@Composable
private fun MangaSummary(