Missing await in InstallerVM BeginCommand

This commit is contained in:
Justin Swanson 2019-11-23 21:37:07 -06:00
parent 4f4e6e0f7e
commit 3f3bd03cd5
2 changed files with 9 additions and 3 deletions

View File

@ -228,7 +228,7 @@ namespace Wabbajack
canExecute: this.WhenAny(x => x.ModList)
.Select(modList => !string.IsNullOrEmpty(modList?.Readme))
.ObserveOnGuiThread());
BeginCommand = ReactiveCommand.Create(
BeginCommand = ReactiveCommand.CreateFromTask(
execute: ExecuteBegin,
canExecute: Observable.CombineLatest(
this.WhenAny(x => x.Installing),
@ -315,7 +315,7 @@ namespace Wabbajack
}
}
private void ExecuteBegin()
private async Task ExecuteBegin()
{
InstallingMode = true;
AInstaller installer;
@ -337,7 +337,7 @@ namespace Wabbajack
return;
}
Task.Run(async () =>
await Task.Run(async () =>
{
IDisposable subscription = null;
try

View File

@ -43,6 +43,8 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<NoWarn>CS1998</NoWarn>
<WarningsAsErrors>CS4014</WarningsAsErrors>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>x64</PlatformTarget>
@ -53,6 +55,8 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
<NoWarn>CS1998</NoWarn>
<WarningsAsErrors>CS4014</WarningsAsErrors>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>Resources\Icons\wabbajack.ico</ApplicationIcon>
@ -66,6 +70,8 @@
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
<NoWarn>CS1998</NoWarn>
<WarningsAsErrors>CS4014</WarningsAsErrors>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>