mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 08:52:55 +08:00
Merge pull request #29349 from peppy/fix-daily-challenge-async-test-woo
Fix potential test failure in daily challenge tests
This commit is contained in:
commit
45c1dfde5e
@ -4,6 +4,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Audio;
|
using osu.Framework.Audio;
|
||||||
using osu.Framework.Audio.Sample;
|
using osu.Framework.Audio.Sample;
|
||||||
@ -455,6 +456,7 @@ namespace osu.Game.Screens.OnlinePlay.DailyChallenge
|
|||||||
|
|
||||||
MultiplayerPlaylistItemStats[] stats = t.GetResultSafely();
|
MultiplayerPlaylistItemStats[] stats = t.GetResultSafely();
|
||||||
var itemStats = stats.SingleOrDefault(item => item.PlaylistItemID == playlistItem.ID);
|
var itemStats = stats.SingleOrDefault(item => item.PlaylistItemID == playlistItem.ID);
|
||||||
|
|
||||||
if (itemStats == null) return;
|
if (itemStats == null) return;
|
||||||
|
|
||||||
Schedule(() =>
|
Schedule(() =>
|
||||||
@ -462,7 +464,7 @@ namespace osu.Game.Screens.OnlinePlay.DailyChallenge
|
|||||||
breakdown.SetInitialCounts(itemStats.TotalScoreDistribution);
|
breakdown.SetInitialCounts(itemStats.TotalScoreDistribution);
|
||||||
totals.SetInitialCounts(itemStats.TotalScoreDistribution.Sum(c => c), itemStats.CumulativeScore);
|
totals.SetInitialCounts(itemStats.TotalScoreDistribution.Sum(c => c), itemStats.CumulativeScore);
|
||||||
});
|
});
|
||||||
});
|
}, TaskContinuationOptions.OnlyOnRanToCompletion);
|
||||||
|
|
||||||
beatmapAvailabilityTracker.SelectedItem.Value = playlistItem;
|
beatmapAvailabilityTracker.SelectedItem.Value = playlistItem;
|
||||||
beatmapAvailabilityTracker.Availability.BindValueChanged(_ => trySetDailyChallengeBeatmap(), true);
|
beatmapAvailabilityTracker.Availability.BindValueChanged(_ => trySetDailyChallengeBeatmap(), true);
|
||||||
|
Loading…
Reference in New Issue
Block a user