Fix music playlist being enumerated asynchronously

This commit is contained in:
smoogipoo
2020-02-17 16:59:35 +09:00
parent 6fd5667ff4
commit 5ca93758dc
3 changed files with 36 additions and 13 deletions

View File

@ -75,8 +75,6 @@ namespace osu.Game.Overlays.Music
},
};
list.Items.BindTo(beatmapSets);
filter.Search.OnCommit = (sender, newText) =>
{
BeatmapInfo toSelect = list.FirstVisibleSet?.Beatmaps?.FirstOrDefault();
@ -87,7 +85,13 @@ namespace osu.Game.Overlays.Music
beatmap.Value.Track.Restart();
}
};
}
protected override void LoadComplete()
{
base.LoadComplete();
list.Items.BindTo(beatmapSets);
beatmap.BindValueChanged(working => list.SelectedSet.Value = working.NewValue.BeatmapSetInfo, true);
}