1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 08:07:24 +08:00

Don't show beatmaps that are already added.

This commit is contained in:
naoey 2017-09-08 23:16:48 +05:30
parent 20f93c83d6
commit 31a507372a
No known key found for this signature in database
GPG Key ID: 2CCE71F6713C9069

View File

@ -27,6 +27,7 @@ namespace osu.Game.Overlays
private APIAccess api;
private RulesetStore rulesets;
private BeatmapManager beatmaps;
private readonly FillFlowContainer resultCountsContainer;
private readonly OsuSpriteText resultCountsText;
@ -147,6 +148,8 @@ namespace osu.Game.Overlays
{
this.api = api;
this.rulesets = rulesets;
this.beatmaps = beatmaps;
resultCountsContainer.Colour = colours.Yellow;
beatmaps.BeatmapSetAdded += setAdded;
@ -237,7 +240,10 @@ namespace osu.Game.Overlays
getSetsRequest.Success += r =>
{
BeatmapSets = r?.Select(response => response.ToBeatmapSet(rulesets));
BeatmapSets = r?.
Select(response => response.ToBeatmapSet(rulesets)).
Where(b => (beatmaps.QueryBeatmapSet(q => q.OnlineBeatmapSetID == b.OnlineBeatmapSetID) == null));
if (BeatmapSets == null) return;
var artists = new List<string>();