1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 01:02:55 +08:00

Fix remaining issues

This commit is contained in:
Dean Herbert 2019-06-28 21:26:31 +09:00
parent 1289b7f5fe
commit c9104e9176

View File

@ -25,7 +25,7 @@ namespace osu.Desktop.Updater
private UpdateManager updateManager; private UpdateManager updateManager;
private NotificationOverlay notificationOverlay; private NotificationOverlay notificationOverlay;
public Task PrepareUpdate() => UpdateManager.RestartAppWhenExited(); public Task PrepareUpdateAsync() => UpdateManager.RestartAppWhenExited();
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load(NotificationOverlay notification, OsuGameBase game) private void load(NotificationOverlay notification, OsuGameBase game)
@ -86,8 +86,7 @@ namespace osu.Desktop.Updater
} }
else else
{ {
if (notification != null) notification.State = ProgressNotificationState.Cancelled;
notification.State = ProgressNotificationState.Cancelled;
Logger.Error(e, @"update failed!"); Logger.Error(e, @"update failed!");
} }
} }
@ -130,7 +129,7 @@ namespace osu.Desktop.Updater
Activated = () => Activated = () =>
{ {
updateManager.PrepareUpdateAsync() updateManager.PrepareUpdateAsync()
.ContinueWith(_ => Schedule(() => game.GracefullyExit())); .ContinueWith(_ => Schedule(() => game.GracefullyExit()));
return true; return true;
} }
}; };