1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 15:33:21 +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.
CurrentDialog = dialog;
if (IsLoaded)
Scheduler.Add(pushDialog, false);
else
Schedule(pushDialog);
void pushDialog()
Schedule(() =>
{
// if any existing dialog is being displayed, dismiss it before showing a new one.
lastDialog?.Hide();
@ -71,7 +66,7 @@ namespace osu.Game.Overlays
dialogContainer.Add(dialog);
Show();
}
});
}
public override bool IsPresent => Scheduler.HasPendingTasks || dialogContainer.Children.Count > 0;