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
* Optimize the modlist optimizer so runs a bit faster
* 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
* 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()
{
Status = ModListStatus.Downloading;
using var ll = LoadingLock.WithLoading();
var (progress, task) = _maintainer.DownloadModlist(Metadata);
var dispose = progress
.BindToStrict(this, vm => vm.ProgressPercent);
try
{
Status = ModListStatus.Downloading;
await task;
await _wjClient.SendMetric("downloading", Metadata.Title);
await UpdateStatus();
dispose.Dispose();
using var ll = LoadingLock.WithLoading();
var (progress, task) = _maintainer.DownloadModlist(Metadata);
var dispose = progress
.BindToStrict(this, vm => vm.ProgressPercent);
try
{
await _wjClient.SendMetric("downloading", Metadata.Title);
await task;
await UpdateStatus();
}
finally
{
dispose.Dispose();
}
}
catch (Exception ex)
{
_logger.LogError(ex, "While downloading {Modlist}", Metadata.RepositoryName);
await UpdateStatus();
}
}
private async Task UpdateStatus()