Commit bc8ede8e authored by Riegel's avatar Riegel
Browse files

Refactor: Rename variables

2 merge requests!28Version 3.17.0 Release,!26Add ZIP-archive support
Showing with 9 additions and 9 deletions
+9 -9
......@@ -137,18 +137,18 @@ public class ZipEntryPicker {
subpathValueTxt.setText(entry.getFileName());
if (entry.getFileSize() != -1L) {
long fileSize = entry.getFileSize();
long KB = 1024L;
long MB = KB * KB;
long GB = MB * KB;
long kb = 1024L;
long mb = kb * kb;
long gb = mb * kb;
if (fileSize < KB) {
if (fileSize < kb) {
filesizeValue.setText("< 1 KB");
} else if (fileSize < MB) {
filesizeValue.setText(String.format("%s KB", fileSize / KB));
} else if (fileSize < GB) {
filesizeValue.setText(String.format("%s MB", fileSize / MB));
} else if (fileSize < mb) {
filesizeValue.setText(String.format("%s KB", fileSize / kb));
} else if (fileSize < gb) {
filesizeValue.setText(String.format("%s MB", fileSize / mb));
} else {
double gigabytes = (double) fileSize / GB;
double gigabytes = (double) fileSize / gb;
filesizeValue.setText(String.format("%.2f GB", gigabytes));
}
} else {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment