mirror of
https://github.com/ppy/osu
synced 2024-12-13 18:37:04 +00:00
Fix multiplayer potentially getting incorrect beatmap availability state after changing beatmaps
This commit is contained in:
parent
cb5c6e1924
commit
85037dfb70
@ -53,7 +53,10 @@ namespace osu.Game.Online.Rooms
|
||||
downloadTracker?.RemoveAndDisposeImmediately();
|
||||
|
||||
downloadTracker = new BeatmapDownloadTracker(item.NewValue.Beatmap.Value.BeatmapSet);
|
||||
downloadTracker.State.BindValueChanged(_ => updateAvailability());
|
||||
|
||||
AddInternal(downloadTracker);
|
||||
|
||||
downloadTracker.State.BindValueChanged(_ => updateAvailability(), true);
|
||||
downloadTracker.Progress.BindValueChanged(_ =>
|
||||
{
|
||||
if (downloadTracker.State.Value != DownloadState.Downloading)
|
||||
@ -63,9 +66,7 @@ namespace osu.Game.Online.Rooms
|
||||
// we don't want to flood the network with this, so rate limit how often we send progress updates.
|
||||
if (progressUpdate?.Completed != false)
|
||||
progressUpdate = Scheduler.AddDelayed(updateAvailability, progressUpdate == null ? 0 : 500);
|
||||
});
|
||||
|
||||
AddInternal(downloadTracker);
|
||||
}, true);
|
||||
}, true);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user