From 35078e49b44df742b0defc06fc1aa767126dcffe Mon Sep 17 00:00:00 2001 From: pizzaboxer <41478239+pizzaboxer@users.noreply.github.com> Date: Sun, 8 Jan 2023 15:35:16 +0000 Subject: [PATCH] Allow download progress to 100% --- Bloxstrap/Bootstrapper.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Bloxstrap/Bootstrapper.cs b/Bloxstrap/Bootstrapper.cs index abfbe78..b4c9884 100644 --- a/Bloxstrap/Bootstrapper.cs +++ b/Bloxstrap/Bootstrapper.cs @@ -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");