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

Fix dialog not closing after spamming OS window close

This commit is contained in:
Joseph Madamba 2021-06-21 20:23:11 -07:00
parent 9bcd1e6922
commit db86098062

View File

@ -317,12 +317,17 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
} }
if (!exitConfirmed && dialogOverlay != null) if (!exitConfirmed && dialogOverlay != null)
{
if (dialogOverlay.CurrentDialog is ConfirmDialog confirmDialog)
confirmDialog.PerformOkAction();
else
{ {
dialogOverlay.Push(new ConfirmDialog("Are you sure you want to leave this multiplayer match?", () => dialogOverlay.Push(new ConfirmDialog("Are you sure you want to leave this multiplayer match?", () =>
{ {
exitConfirmed = true; exitConfirmed = true;
this.Exit(); this.Exit();
})); }));
}
return true; return true;
} }