diff --git a/osu.Desktop/Updater/VelopackUpdateManager.cs b/osu.Desktop/Updater/VelopackUpdateManager.cs index eb1463483f..4d2535ed32 100644 --- a/osu.Desktop/Updater/VelopackUpdateManager.cs +++ b/osu.Desktop/Updater/VelopackUpdateManager.cs @@ -52,7 +52,7 @@ private async Task checkForUpdateAsync(UpdateProgressNotification? notific if (localUserInfo?.IsPlaying.Value == true) return false; - var info = await updateManager.CheckForUpdatesAsync().ConfigureAwait(false); + UpdateInfo? info = await updateManager.CheckForUpdatesAsync().ConfigureAwait(false); // Handle no updates available. if (info == null) @@ -65,7 +65,7 @@ private async Task checkForUpdateAsync(UpdateProgressNotification? notific { Activated = () => { - restartToApplyUpdate(); + restartToApplyUpdate(null); return true; } }); @@ -78,7 +78,7 @@ private async Task checkForUpdateAsync(UpdateProgressNotification? notific { notification = new UpdateProgressNotification { - CompletionClickAction = restartToApplyUpdate, + CompletionClickAction = () => restartToApplyUpdate(info), }; Schedule(() => notificationOverlay.Post(notification)); @@ -117,9 +117,9 @@ private async Task checkForUpdateAsync(UpdateProgressNotification? notific return true; } - private bool restartToApplyUpdate() + private bool restartToApplyUpdate(UpdateInfo? info) { - updateManager.WaitExitThenApplyUpdates(null); + updateManager.WaitExitThenApplyUpdates(info?.TargetFullRelease); Schedule(() => game.AttemptExit()); return true; }