Update nuget packages

This commit is contained in:
Alexey Golub 2018-04-01 00:31:58 +03:00
parent 5a84fb25e6
commit 7ffb799136
4 changed files with 9 additions and 8 deletions

View file

@ -14,8 +14,8 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="11.0.1" />
<PackageReference Include="Onova" Version="2.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
<PackageReference Include="Onova" Version="2.1.0" />
<PackageReference Include="Tyrrrz.Extensions" Version="1.5.0" />
<PackageReference Include="Tyrrrz.Settings" Version="1.3.2" />
</ItemGroup>

View file

@ -9,6 +9,6 @@ namespace DiscordChatExporter.Core.Services
Task<Version> CheckPrepareUpdateAsync();
Task FinalizeUpdateAsync();
void FinalizeUpdate();
}
}

View file

@ -39,12 +39,13 @@ namespace DiscordChatExporter.Core.Services
return null;
// Prepare the update
if (!_manager.IsUpdatePrepared(check.LastVersion))
await _manager.PrepareUpdateAsync(check.LastVersion);
return _updateVersion = check.LastVersion;
}
public async Task FinalizeUpdateAsync()
public void FinalizeUpdate()
{
// Check if an update is pending
if (_updateVersion == null)
@ -55,7 +56,7 @@ namespace DiscordChatExporter.Core.Services
return;
// Launch the updater
await _manager.LaunchUpdaterAsync(_updateVersion, NeedRestart);
_manager.LaunchUpdater(_updateVersion, NeedRestart);
_updateFinalized = true;
}
}

View file

@ -143,13 +143,13 @@ namespace DiscordChatExporter.Gui.ViewModels
}
}
private async void ViewClosed()
private void ViewClosed()
{
// Save settings
_settingsService.Save();
// Finalize updates if available
await _updateService.FinalizeUpdateAsync();
_updateService.FinalizeUpdate();
}
private async void PullData()