Allow download progress to 100%

This commit is contained in:
pizzaboxer 2023-01-08 15:35:16 +00:00
parent 3b7bf97682
commit 35078e49b4

View File

@ -418,10 +418,8 @@ namespace Bloxstrap
Dialog.ProgressStyle = ProgressBarStyle.Continuous;
// compute total bytes to download
foreach (var package in VersionPackageManifest)
{
foreach (Package package in VersionPackageManifest)
TotalBytes += package.PackedSize;
}
ProgressIncrement = (double)1 / TotalBytes * 100;
@ -433,6 +431,9 @@ namespace Bloxstrap
await DownloadPackage(package);
}
// allow progress bar to 100% before continuing (purely ux reasons lol)
await Task.Delay(1000);
Dialog.ProgressStyle = ProgressBarStyle.Marquee;
Debug.WriteLine("Finished downloading");