From 3e417d8e300b228ad190903d52bf35b0aed5bc77 Mon Sep 17 00:00:00 2001 From: Aergwyn Date: Fri, 8 Dec 2017 12:47:28 +0100 Subject: [PATCH] removed specific AddBeatmap method the way UpdateBeatmapSet was extended it can handle all of this and better --- osu.Game/Screens/Select/BeatmapCarousel.cs | 16 ---------------- osu.Game/Screens/Select/SongSelect.cs | 4 +--- 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/osu.Game/Screens/Select/BeatmapCarousel.cs b/osu.Game/Screens/Select/BeatmapCarousel.cs index cbeefcdda5..3e86fd260a 100644 --- a/osu.Game/Screens/Select/BeatmapCarousel.cs +++ b/osu.Game/Screens/Select/BeatmapCarousel.cs @@ -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))); diff --git a/osu.Game/Screens/Select/SongSelect.cs b/osu.Game/Screens/Select/SongSelect.cs index ee231ff5f4..b1ee7f32f8 100644 --- a/osu.Game/Screens/Select/SongSelect.cs +++ b/osu.Game/Screens/Select/SongSelect.cs @@ -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);