3
0
mirror of https://github.com/Qortal/qortal.git synced 2025-02-14 11:15:49 +00:00

add decimal precision to download progress

This commit is contained in:
QuickMythril 2022-03-31 13:46:40 -04:00 committed by GitHub
parent f8ffeed302
commit 6edbc8b6a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -419,8 +419,8 @@ public class Bootstrap {
downloaded += bytesRead;
if (fileSize > 0) {
int progress = (int)((double)downloaded / (double)fileSize * 100);
SplashFrame.getInstance().updateStatus(String.format("Downloading %s bootstrap... (%d%%)", type, progress));
double progress = (double)downloaded / (double)fileSize * 100;
SplashFrame.getInstance().updateStatus(String.format("Downloading %s bootstrap... (%.1f%%)", type, progress));
}
}