mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 07:42:57 +08:00
Fix scores sometimes shown with incorrect scoring mode
This commit is contained in:
parent
e869b7286a
commit
bd9c0076df
@ -118,7 +118,11 @@ namespace osu.Game.Scoring
|
||||
public void GetTotalScore([NotNull] ScoreInfo score, [NotNull] Action<long> callback, ScoringMode mode = ScoringMode.Standardised, CancellationToken cancellationToken = default)
|
||||
{
|
||||
GetTotalScoreAsync(score, mode, cancellationToken)
|
||||
.ContinueWith(task => scheduler.Add(() => callback(task.GetResultSafely())), TaskContinuationOptions.OnlyOnRanToCompletion);
|
||||
.ContinueWith(task => scheduler.Add(() =>
|
||||
{
|
||||
if (!cancellationToken.IsCancellationRequested)
|
||||
callback(task.GetResultSafely());
|
||||
}), TaskContinuationOptions.OnlyOnRanToCompletion);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
Loading…
Reference in New Issue
Block a user