1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 09:27:29 +08:00

Merge pull request #10735 from bdach/fix-online-difficulty-retrieval

Fix difficulty retrieval for online-sourced beatmaps
This commit is contained in:
Dean Herbert 2020-11-08 11:18:59 +09:00 committed by GitHub
commit 58dbfce75b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -202,7 +202,9 @@ namespace osu.Game.Beatmaps
/// <param name="cancellationToken">A token that may be used to cancel this update.</param>
private void updateBindable([NotNull] BindableStarDifficulty bindable, [CanBeNull] RulesetInfo rulesetInfo, [CanBeNull] IEnumerable<Mod> mods, CancellationToken cancellationToken = default)
{
GetAsync(new DifficultyCacheLookup(bindable.Beatmap, rulesetInfo, mods), cancellationToken)
// GetDifficultyAsync will fall back to existing data from BeatmapInfo if not locally available
// (contrary to GetAsync)
GetDifficultyAsync(bindable.Beatmap, rulesetInfo, mods, cancellationToken)
.ContinueWith(t =>
{
// We're on a threadpool thread, but we should exit back to the update thread so consumers can safely handle value-changed events.