1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-15 11:47:24 +08:00

Remove unused parameter

This commit is contained in:
Dan Balasescu 2024-10-07 19:48:57 +09:00
parent 7cc6fe3819
commit c3f2c82b10
No known key found for this signature in database

View File

@ -45,7 +45,7 @@ namespace osu.Desktop.Updater
protected override async Task<bool> PerformUpdateCheck() => await checkForUpdateAsync().ConfigureAwait(false); protected override async Task<bool> PerformUpdateCheck() => await checkForUpdateAsync().ConfigureAwait(false);
private async Task<bool> checkForUpdateAsync(UpdateProgressNotification? notification = null) private async Task<bool> checkForUpdateAsync()
{ {
// whether to check again in 30 minutes. generally only if there's an error or no update was found (yet). // whether to check again in 30 minutes. generally only if there's an error or no update was found (yet).
bool scheduleRecheck = false; bool scheduleRecheck = false;
@ -86,26 +86,21 @@ namespace osu.Desktop.Updater
} }
// An update is found, let's notify the user and start downloading it. // An update is found, let's notify the user and start downloading it.
if (notification == null) UpdateProgressNotification notification = new UpdateProgressNotification
{ {
notification = new UpdateProgressNotification CompletionClickAction = () =>
{ {
CompletionClickAction = () => Task.Run(restartToApplyUpdate);
{ return true;
Task.Run(restartToApplyUpdate); },
return true; };
},
};
runOutsideOfGameplay(() => notificationOverlay.Post(notification));
}
runOutsideOfGameplay(() => notificationOverlay.Post(notification));
notification.StartDownload(); notification.StartDownload();
try try
{ {
await updateManager.DownloadUpdatesAsync(pendingUpdate, p => notification.Progress = p / 100f).ConfigureAwait(false); await updateManager.DownloadUpdatesAsync(pendingUpdate, p => notification.Progress = p / 100f).ConfigureAwait(false);
runOutsideOfGameplay(() => notification.State = ProgressNotificationState.Completed); runOutsideOfGameplay(() => notification.State = ProgressNotificationState.Completed);
} }
catch (Exception e) catch (Exception e)