mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 15:33:05 +08:00
Ensure beatmap set is always detached when updating
Slight performance improvement by doing the detach as early as possible.
This commit is contained in:
parent
e734cdfee5
commit
63b4327978
@ -417,16 +417,23 @@ namespace osu.Game.Screens.Select
|
||||
}
|
||||
}
|
||||
|
||||
public void UpdateBeatmapSet(BeatmapSetInfo beatmapSet) => Schedule(() =>
|
||||
public void UpdateBeatmapSet(BeatmapSetInfo beatmapSet)
|
||||
{
|
||||
updateBeatmapSet(beatmapSet);
|
||||
invalidateAfterChange();
|
||||
});
|
||||
beatmapSet = beatmapSet.Detach();
|
||||
|
||||
Schedule(() =>
|
||||
{
|
||||
updateBeatmapSet(beatmapSet);
|
||||
invalidateAfterChange();
|
||||
});
|
||||
}
|
||||
|
||||
private void updateBeatmapSet(BeatmapSetInfo beatmapSet)
|
||||
{
|
||||
beatmapSet = beatmapSet.Detach();
|
||||
|
||||
originalBeatmapSetsDetached.RemoveAll(set => set.ID == beatmapSet.ID);
|
||||
originalBeatmapSetsDetached.Add(beatmapSet.Detach());
|
||||
originalBeatmapSetsDetached.Add(beatmapSet);
|
||||
|
||||
var newSets = new List<CarouselBeatmapSet>();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user