Change text generation for formatting preview box

This commit is contained in:
Sad Ellie 2023-05-25 22:27:32 +03:00
parent 77e10c3349
commit 97aac49b19

View File

@ -73,8 +73,8 @@ class FormattingViewModel @Inject constructor(
formatterSymbols: FormatterSymbols formatterSymbols: FormatterSymbols
): String { ): String {
val bigD = when { val bigD = when {
fractional -> "0.${"0000001".padStart(precision, '0')}" fractional -> "0.${"1".padStart(precision, '0')}"
precision > 0 -> "123456.${"7890123456".repeat(ceil(precision.toDouble() / 10.0).toInt())}" precision > 0 -> "123456.${"789123456".repeat(ceil(precision.toDouble() / 9.0).toInt())}"
else -> "123456" else -> "123456"
} }