mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-05 16:43:26 +02:00
Refactoring
This commit is contained in:
@@ -697,7 +697,11 @@ public class Helper {
|
||||
|
||||
private static final DecimalFormat df = new DecimalFormat("@@");
|
||||
|
||||
static String humanReadableByteCount(long bytes, boolean si) {
|
||||
static String humanReadableByteCount(long bytes) {
|
||||
return humanReadableByteCount(bytes, true);
|
||||
}
|
||||
|
||||
private static String humanReadableByteCount(long bytes, boolean si) {
|
||||
int unit = si ? 1000 : 1024;
|
||||
if (bytes < unit) return bytes + " B";
|
||||
int exp = (int) (Math.log(bytes) / Math.log(unit));
|
||||
|
||||
Reference in New Issue
Block a user