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
1 changed files with 8 additions and 13 deletions

View File

@ -45,7 +45,7 @@ private void load(INotificationOverlay notifications)
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).
bool scheduleRecheck = false;
@ -86,26 +86,21 @@ private async Task<bool> checkForUpdateAsync(UpdateProgressNotification? notific
}
// 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;
},
};
runOutsideOfGameplay(() => notificationOverlay.Post(notification));
}
Task.Run(restartToApplyUpdate);
return true;
},
};
runOutsideOfGameplay(() => notificationOverlay.Post(notification));
notification.StartDownload();
try
{
await updateManager.DownloadUpdatesAsync(pendingUpdate, p => notification.Progress = p / 100f).ConfigureAwait(false);
runOutsideOfGameplay(() => notification.State = ProgressNotificationState.Completed);
}
catch (Exception e)