Fixes cutting text in the wrong language

This commit is contained in:
Vitor Pamplona
2023-05-07 21:45:38 -04:00
parent aa07fbfc94
commit 462c73341f
@@ -42,7 +42,7 @@ fun ExpandableRichTextViewer(
) {
var showFullText by remember { mutableStateOf(false) }
val whereToCut = remember {
val whereToCut = remember(content) {
// Cuts the text in the first space after 350
val firstSpaceAfterCut = content.indexOf(' ', SHORT_TEXT_LENGTH).let { if (it < 0) content.length else it }
val firstNewLineAfterCut = content.indexOf('\n', SHORT_TEXT_LENGTH).let { if (it < 0) content.length else it }