Skip to content

Commit

Permalink
Update UI Feedback: Improve visibility during directory loading
Browse files Browse the repository at this point in the history
* Details: Added status bar updates to show when directory information is loading. Visibility of the status bar and progress bar are toggled accordingly to better inform users.
* Rationale: Enhances user interface feedback, making the loading process more transparent and user-friendly.
* Fixes: None.
* Related: None.
  • Loading branch information
HakuSystems committed Aug 7, 2024
1 parent b1398c0 commit d1390b8
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,9 @@ private async Task PopulateExtractedFilesListAsync()
var directories = Directory.GetDirectories(ConfigHelper.Config.LastExtractedPath);
foreach (var directory in directories)
{
StatusBar.Visibility = Visibility.Visible;
StatusProgressBar.Visibility = Visibility.Collapsed;
StatusBarText.Text = $"Loading {Path.GetFileName(directory)} Information...";
// Calculate total size and create a model for the Unitypackage.
var totalSizeInBytes = await Task.Run(async () => await CalculateDirectoryTotalSizeInBytesAsync(directory));
var unitypackage =
Expand All @@ -201,6 +204,8 @@ private async Task PopulateExtractedFilesListAsync()
if (ExtractedUnitypackages.All(u => u.UnitypackageName != unitypackage.UnitypackageName))
ExtractedUnitypackages.Add(unitypackage);
});
StatusBar.Visibility = Visibility.Collapsed;
StatusProgressBar.Visibility = Visibility.Visible;
}

await _logger.LogAsync("Populated Extracted Files List", "Extraction.xaml.cs", Importance.Info);
Expand Down

0 comments on commit d1390b8

Please sign in to comment.