Fix callback potentially not getting fired

This commit is contained in:
Dean Herbert
2019-03-01 20:52:34 +09:00
parent 19ce1f2869
commit c01990d005
2 changed files with 4 additions and 2 deletions

View File

@ -625,7 +625,9 @@ namespace osu.Game.Screens.Select
{
if (beatmap == null || beatmap.ID <= 0) return;
dialogOverlay?.Push(new BeatmapClearScoresDialog(beatmap, () => BeatmapDetails.Leaderboard.RefreshScores()));
dialogOverlay?.Push(new BeatmapClearScoresDialog(beatmap, () =>
// schedule done here rather than inside the dialog as the dialog may fade out and never callback.
Schedule(() => BeatmapDetails.Leaderboard.RefreshScores())));
}
public override bool OnPressed(GlobalAction action)