1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-13 15:03:13 +08:00

Add schedule and cancellation check to score ordering step

This commit is contained in:
Dean Herbert 2022-01-31 13:50:53 +09:00
parent 610eb9f6a4
commit 9c9fda84f3

View File

@ -201,10 +201,13 @@ namespace osu.Game.Screens.Select.Leaderboards
scores = scores.Detach();
scoreManager.OrderByTotalScoreAsync(scores.ToArray(), cancellationToken)
.ContinueWith(ordered =>
.ContinueWith(ordered => Schedule(() =>
{
if (cancellationToken.IsCancellationRequested)
return;
SetScores(ordered.GetResultSafely());
}, TaskContinuationOptions.OnlyOnRanToCompletion);
}), TaskContinuationOptions.OnlyOnRanToCompletion);
}
}