Clean up litany text label
This commit is contained in:
parent
4f5e93e182
commit
1b6b97243b
1 changed files with 2 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue