mirror of
https://github.com/MetaCubeX/ClashMetaForAndroid.git
synced 2025-03-26 18:13:59 +03:00
Fix: fix traffic format
This commit is contained in:
parent
5e54e4561c
commit
5bc3975591
@ -22,17 +22,17 @@ private fun trafficString(scaled: Long): String {
|
||||
scaled > 1024 * 1024 * 1024 * 100L -> {
|
||||
val data = scaled / 1024 / 1024 / 1024
|
||||
|
||||
"${data / 100}.${data % 100} GiB"
|
||||
String.format("%.2f GiB", data.toFloat() / 100)
|
||||
}
|
||||
scaled > 1024 * 1024 * 100L -> {
|
||||
val data = scaled / 1024 / 1024
|
||||
|
||||
"${data / 100}.${data % 100} MiB"
|
||||
String.format("%.2f MiB", data.toFloat() / 100)
|
||||
}
|
||||
scaled > 1024 * 100L -> {
|
||||
val data = scaled / 1024
|
||||
|
||||
"${data / 100}.${data % 100} KiB"
|
||||
String.format("%.2f KiB", data.toFloat() / 100)
|
||||
}
|
||||
else -> {
|
||||
"$scaled Bytes"
|
||||
|
Loading…
x
Reference in New Issue
Block a user