From 5d846bff7baf34c03dec78c1305775fa3e760563 Mon Sep 17 00:00:00 2001 From: EVAST9919 Date: Mon, 6 Nov 2017 22:05:04 +0300 Subject: [PATCH] Add (temporarily?) subrequest for each item to provide correct beatmap information --- .../Beatmaps/PaginatedBeatmapContainer.cs | 24 ++++++++++++------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/osu.Game/Overlays/Profile/Sections/Beatmaps/PaginatedBeatmapContainer.cs b/osu.Game/Overlays/Profile/Sections/Beatmaps/PaginatedBeatmapContainer.cs index f15798864f..9b623a3db9 100644 --- a/osu.Game/Overlays/Profile/Sections/Beatmaps/PaginatedBeatmapContainer.cs +++ b/osu.Game/Overlays/Profile/Sections/Beatmaps/PaginatedBeatmapContainer.cs @@ -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); } };