style(android): satisfy compact token ktlint

This commit is contained in:
Vincent Koc
2026-07-21 14:37:46 +02:00
parent a11b13622a
commit 8187c09a58
2 changed files with 3 additions and 2 deletions
+2 -2
View File
@@ -13035,7 +13035,7 @@
},
{
"kind": "ui-call",
"line": 252,
"line": 253,
"path": "apps/android/app/src/main/java/ai/openclaw/app/ui/chat/ChatTurnRecap.kt",
"source": "${decimal(count / 1_000_000.0)}M",
"surface": "android",
@@ -13043,7 +13043,7 @@
},
{
"kind": "ui-call",
"line": 259,
"line": 260,
"path": "apps/android/app/src/main/java/ai/openclaw/app/ui/chat/ChatTurnRecap.kt",
"source": "${thousands}k",
"surface": "android",
@@ -247,6 +247,7 @@ internal fun turnRecapTokenFormat(count: Long): TurnRecapTokenFormat = TurnRecap
internal fun formatCompactTokenCount(count: Long): String {
fun decimal(value: Double): String = String.format(Locale.US, "%.1f", value).removeSuffix(".0")
fun millions(): String {
val value = decimal(count / 1_000_000.0)
return nativeString("\${decimal(count / 1_000_000.0)}M", value)