Fixed status term used when in failed state

This commit is contained in:
Justin Swanson 2020-01-14 23:24:59 -06:00
parent bd87c0c719
commit 5abcdc651b
2 changed files with 22 additions and 10 deletions

View File

@ -243,18 +243,24 @@ namespace Wabbajack
}
});
_progressTitle = Observable.CombineLatest(
this.WhenAny(x => x.Compiling),
this.WhenAny(x => x.StartedCompilation),
resultSelector: (compiling, started) =>
_progressTitle = this.WhenAnyValue(
x => x.Compiling,
x => x.StartedCompilation,
x => x.Completed,
selector: (compiling, started, completed) =>
{
if (compiling)
{
return "Compiling";
}
else if (started)
{
if (completed == null) return "Compiling";
return completed.Value.Succeeded ? "Compiled" : "Failed";
}
else
{
return started ? "Compiled" : "Configuring";
return "Configuring";
}
})
.ToProperty(this, nameof(ProgressTitle));

View File

@ -285,18 +285,24 @@ namespace Wabbajack
.Select(x => x?.StartsWith("https://") ?? false)
.ObserveOnGuiThread());
_progressTitle = Observable.CombineLatest(
this.WhenAny(x => x.Installing),
this.WhenAny(x => x.StartedInstallation),
resultSelector: (installing, started) =>
_progressTitle = this.WhenAnyValue(
x => x.Installing,
x => x.StartedInstallation,
x => x.Completed,
selector: (installing, started, completed) =>
{
if (installing)
{
return "Installing";
}
else if (started)
{
if (completed == null) return "Installing";
return completed.Value.Succeeded ? "Installed" : "Failed";
}
else
{
return started ? "Installed" : "Configuring";
return "Configuring";
}
})
.ToProperty(this, nameof(ProgressTitle));