mirror of
https://github.com/ppy/osu
synced 2025-03-05 10:58:34 +00:00
Add (temporarily?) subrequest for each item to provide correct beatmap information
This commit is contained in:
parent
b8b5c67cd2
commit
5d846bff7b
@ -47,18 +47,24 @@ namespace osu.Game.Overlays.Profile.Sections.Beatmaps
|
||||
|
||||
foreach (var s in sets)
|
||||
{
|
||||
var panel = new DirectGridPanel(s.ToBeatmapSet(Rulesets)) { Width = 400 };
|
||||
ItemsContainer.Add(panel);
|
||||
|
||||
panel.PreviewPlaying.ValueChanged += newValue =>
|
||||
var subReq = new GetBeatmapSetRequest(s.OnlineBeatmapSetID.Value);
|
||||
subReq.Success += b =>
|
||||
{
|
||||
if (newValue)
|
||||
var panel = new DirectGridPanel(b.ToBeatmapSet(Rulesets)) { Width = 400 };
|
||||
ItemsContainer.Add(panel);
|
||||
|
||||
panel.PreviewPlaying.ValueChanged += newValue =>
|
||||
{
|
||||
if (playing != null && playing != panel)
|
||||
playing.PreviewPlaying.Value = false;
|
||||
playing = panel;
|
||||
}
|
||||
if (newValue)
|
||||
{
|
||||
if (playing != null && playing != panel)
|
||||
playing.PreviewPlaying.Value = false;
|
||||
playing = panel;
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
Api.Queue(subReq);
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user