mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 16:27:26 +08:00
Fix callback potentially not getting fired
This commit is contained in:
parent
19ce1f2869
commit
c01990d005
@ -29,7 +29,7 @@ namespace osu.Game.Screens.Select
|
||||
Action = () =>
|
||||
{
|
||||
Task.Run(() => scoreManager.Delete(scoreManager.QueryScores(s => !s.DeletePending && s.Beatmap.ID == beatmap.ID).ToList()))
|
||||
.ContinueWith(t => Schedule(onCompletion));
|
||||
.ContinueWith(_ => onCompletion);
|
||||
}
|
||||
},
|
||||
new PopupDialogCancelButton
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user