mirror of
https://github.com/MetaCubeX/ClashMetaForAndroid.git
synced 2025-03-29 19:59:54 +03:00
Fix: fix traffic format
This commit is contained in:
parent
5e54e4561c
commit
5bc3975591
1 changed files with 3 additions and 3 deletions
|
@ -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…
Add table
Reference in a new issue