This commit is contained in:
2018-08-25 20:42:08 +02:00
parent bfb6971564
commit 1676d03490
10 changed files with 23 additions and 32 deletions

View File

@@ -13,7 +13,7 @@ namespace Example
public class MainWindowViewModel : BindableBase, IDisposable
{
private bool _showRestartAppDialog;
private UpdateManager _updateManager;
private readonly UpdateManager _updateManager;
public MainWindowViewModel()
{
@@ -32,13 +32,12 @@ namespace Example
ShowRestartAppDialog = false;
}
private async Task UpdateAsync(string startup)
{
var silent = bool.Parse(startup);
try
{
var releases = (await _updateManager.CheckForUpdateAsync()).ToList();
var releases = (await _updateManager.CheckForUpdateAsync().ConfigureAwait(false)).ToList();
if (releases.Any())
{
MessageQueue.Enqueue("Update available", "Update now", ActionHandler);
@@ -61,8 +60,7 @@ namespace Example
{
if (await _updateManager.UpdateAppAsync().ConfigureAwait(false))
{
ShowRestartAppDialog = true;
//manager.RestartApp();
ShowRestartAppDialog = true;
}
}