mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 22:56:36 +09:00
Replace usage of .Result
with .WaitSafelyForResult
This commit is contained in:
@ -7,6 +7,7 @@ using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Extensions;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
@ -79,14 +80,16 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
|
||||
};
|
||||
|
||||
scoreManager.OrderByTotalScoreAsync(value.Scores.Select(s => s.CreateScoreInfo(rulesets, beatmapInfo)).ToArray(), loadCancellationSource.Token)
|
||||
.ContinueWith(ordered => Schedule(() =>
|
||||
.ContinueWith(task => Schedule(() =>
|
||||
{
|
||||
if (loadCancellationSource.IsCancellationRequested)
|
||||
return;
|
||||
|
||||
var topScore = ordered.Result.First();
|
||||
var scores = task.WaitSafelyForResult();
|
||||
|
||||
scoreTable.DisplayScores(ordered.Result, apiBeatmap.Status.GrantsPerformancePoints());
|
||||
var topScore = scores.First();
|
||||
|
||||
scoreTable.DisplayScores(scores, apiBeatmap.Status.GrantsPerformancePoints());
|
||||
scoreTable.Show();
|
||||
|
||||
var userScore = value.UserScore;
|
||||
|
Reference in New Issue
Block a user