Fix MatchSongSelect not handling beatmapset deletions

This commit is contained in:
Jamie Taylor
2019-02-22 11:26:06 +00:00
parent 109abf4d28
commit 7c2ffb1826
2 changed files with 24 additions and 1 deletions

View File

@ -39,6 +39,7 @@ namespace osu.Game.Screens.Multi.Match.Components
private void load()
{
beatmaps.ItemAdded += beatmapAdded;
beatmaps.ItemRemoved += beatmapRemoved;
Beatmap.BindValueChanged(b => updateBeatmap(b.NewValue), true);
}
@ -62,6 +63,15 @@ namespace osu.Game.Screens.Multi.Match.Components
Schedule(() => hasBeatmap = true);
}
private void beatmapRemoved(BeatmapSetInfo model)
{
if (Beatmap.Value == null)
return;
if (model.OnlineBeatmapSetID == Beatmap.Value.BeatmapSet.OnlineBeatmapSetID)
Schedule(() => hasBeatmap = false);
}
protected override void Update()
{
base.Update();