Clean up litany text label

This commit is contained in:
Hasinjato 2026-12-01 10:39:05 +03:00
parent 4f5e93e182
commit 1b6b97243b

View file

@ -1622,7 +1622,7 @@ private fun TuoEditDialogWrapper(
fun fitLitanyLabel(
stars: String,
text: String,
rawText: String,
textMeasurer: TextMeasurer,
style: TextStyle,
maxWidthPx: Float
@ -1630,6 +1630,7 @@ fun fitLitanyLabel(
fun widthOf(s: String): Int =
textMeasurer.measure(text = s, style = style, maxLines = 1, softWrap = false).size.width
val text = rawText.replace(Regex("[_/]"), "")
val full = stars + text
if (widthOf(full) <= maxWidthPx) return full
var end = text.length