mirror of
https://github.com/MetaCubeX/ClashMetaForAndroid.git
synced 2026-05-09 18:11:26 +08:00
fix: the error caused by too large value of subscription information
This commit is contained in:
@@ -56,6 +56,12 @@ fun Date.format(
|
||||
|
||||
fun Long.toBytesString(): String {
|
||||
return when {
|
||||
this > 1024.0 * 1024 * 1024 * 1024 * 1024 * 1024 ->
|
||||
String.format("%.2f EiB", (this.toDouble() / 1024 / 1024 / 1024 / 1024 / 1024 / 1024))
|
||||
this > 1024.0 * 1024 * 1024 * 1024 * 1024 ->
|
||||
String.format("%.2f PiB", (this.toDouble() / 1024 / 1024 / 1024 / 1024 / 1024))
|
||||
this > 1024.0 * 1024 * 1024 * 1024 ->
|
||||
String.format("%.2f TiB", (this.toDouble() / 1024 / 1024 / 1024 / 1024))
|
||||
this > 1024 * 1024 * 1024 ->
|
||||
String.format("%.2f GiB", (this.toDouble() / 1024 / 1024 / 1024))
|
||||
this > 1024 * 1024 ->
|
||||
|
||||
Reference in New Issue
Block a user