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

@@ -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
await _manager.PrepareUpdateAsync(check.LastVersion);
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;
}
}