mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Fix crash on restart after update.
Also make update process more graceful.
This commit is contained in:
@ -189,19 +189,24 @@ namespace osu.Desktop.Overlays
|
||||
|
||||
private class UpdateProgressNotification : ProgressNotification
|
||||
{
|
||||
private OsuGame game;
|
||||
|
||||
protected override Notification CreateCompletionNotification() => new ProgressCompletionNotification()
|
||||
{
|
||||
Text = @"Update ready to install. Click to restart!",
|
||||
Activated = () =>
|
||||
{
|
||||
UpdateManager.RestartApp();
|
||||
UpdateManager.RestartAppWhenExited();
|
||||
game.GracefullyExit();
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
private void load(OsuColour colours, OsuGame game)
|
||||
{
|
||||
this.game = game;
|
||||
|
||||
IconContent.Add(new Drawable[]
|
||||
{
|
||||
new Box
|
||||
|
Reference in New Issue
Block a user