This commit is contained in:
Halgari
2022-09-30 23:28:36 -06:00
parent a4e5d41603
commit 9c4f7afa06
2 changed files with 24 additions and 11 deletions

View File

@ -7,6 +7,7 @@
* Fix some status messages during installation * Fix some status messages during installation
* Optimize the modlist optimizer so runs a bit faster * Optimize the modlist optimizer so runs a bit faster
* Rework the file hash cache so it doesn't block the UI thread * Rework the file hash cache so it doesn't block the UI thread
* Errors when downloading modlists no longer cause the app to crash
#### Version - 3.0.1.7 - 9/27/2022 #### Version - 3.0.1.7 - 9/27/2022
* HOTFIX: fix "Could not find part of path" bug related to the profiles folder * HOTFIX: fix "Could not find part of path" bug related to the profiles folder

View File

@ -173,18 +173,30 @@ namespace Wabbajack
private async Task Download() private async Task Download()
{ {
Status = ModListStatus.Downloading; try
{
Status = ModListStatus.Downloading;
using var ll = LoadingLock.WithLoading(); using var ll = LoadingLock.WithLoading();
var (progress, task) = _maintainer.DownloadModlist(Metadata); var (progress, task) = _maintainer.DownloadModlist(Metadata);
var dispose = progress var dispose = progress
.BindToStrict(this, vm => vm.ProgressPercent); .BindToStrict(this, vm => vm.ProgressPercent);
try
await task; {
await _wjClient.SendMetric("downloading", Metadata.Title);
await _wjClient.SendMetric("downloading", Metadata.Title); await task;
await UpdateStatus(); await UpdateStatus();
dispose.Dispose(); }
finally
{
dispose.Dispose();
}
}
catch (Exception ex)
{
_logger.LogError(ex, "While downloading {Modlist}", Metadata.RepositoryName);
await UpdateStatus();
}
} }
private async Task UpdateStatus() private async Task UpdateStatus()