1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-14 02:22:56 +08:00

removed specific AddBeatmap method

the way UpdateBeatmapSet was extended it can handle all of this and better
This commit is contained in:
Aergwyn 2017-12-08 12:47:28 +01:00
parent 105d01d85b
commit 3e417d8e30
2 changed files with 1 additions and 19 deletions

View File

@ -91,22 +91,6 @@ namespace osu.Game.Screens.Select
});
}
public void AddBeatmap(BeatmapSetInfo beatmapSet)
{
Schedule(() =>
{
var group = createGroup(beatmapSet);
if (group == null)
return;
addGroup(group);
computeYPositions();
if (selectedGroup == null)
selectGroup(group);
});
}
public void RemoveBeatmap(BeatmapSetInfo beatmapSet)
{
Schedule(() => removeGroup(groups.Find(b => b.BeatmapSet.ID == beatmapSet.ID)));

View File

@ -302,7 +302,7 @@ namespace osu.Game.Screens.Select
carousel.Filter(criteria, debounce);
}
private void onBeatmapSetAdded(BeatmapSetInfo s) => Schedule(() => addBeatmapSet(s));
private void onBeatmapSetAdded(BeatmapSetInfo s) => Schedule(() => carousel.UpdateBeatmapSet(s));
private void onBeatmapSetRemoved(BeatmapSetInfo s) => Schedule(() => removeBeatmapSet(s));
@ -445,8 +445,6 @@ namespace osu.Game.Screens.Select
}
}
private void addBeatmapSet(BeatmapSetInfo beatmapSet) => carousel.AddBeatmap(beatmapSet);
private void removeBeatmapSet(BeatmapSetInfo beatmapSet)
{
carousel.RemoveBeatmap(beatmapSet);