1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 17:13:06 +08:00

Always schedule popup dialog push

This commit is contained in:
Salman Ahmed 2022-07-14 07:06:03 +03:00
parent 1222123541
commit c59784c49f

View File

@ -57,12 +57,7 @@ namespace osu.Game.Overlays
// a DialogOverlay instance has finished loading. // a DialogOverlay instance has finished loading.
CurrentDialog = dialog; CurrentDialog = dialog;
if (IsLoaded) Schedule(() =>
Scheduler.Add(pushDialog, false);
else
Schedule(pushDialog);
void pushDialog()
{ {
// if any existing dialog is being displayed, dismiss it before showing a new one. // if any existing dialog is being displayed, dismiss it before showing a new one.
lastDialog?.Hide(); lastDialog?.Hide();
@ -71,7 +66,7 @@ namespace osu.Game.Overlays
dialogContainer.Add(dialog); dialogContainer.Add(dialog);
Show(); Show();
} });
} }
public override bool IsPresent => Scheduler.HasPendingTasks || dialogContainer.Children.Count > 0; public override bool IsPresent => Scheduler.HasPendingTasks || dialogContainer.Children.Count > 0;