mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 06:42:54 +08:00
Fix beatmap present failing directly after an import
This commit is contained in:
parent
ae66a7e9e4
commit
69844e6c24
@ -81,7 +81,8 @@ namespace osu.Game.Screens.Select
|
|||||||
itemsCache.Invalidate();
|
itemsCache.Invalidate();
|
||||||
scrollPositionCache.Invalidate();
|
scrollPositionCache.Invalidate();
|
||||||
|
|
||||||
Schedule(() =>
|
// Run on late scheduler want to ensure this runs after all pending UpdateBeatmapSet / RemoveBeatmapSet operations are run.
|
||||||
|
SchedulerAfterChildren.Add(() =>
|
||||||
{
|
{
|
||||||
BeatmapSetsChanged?.Invoke();
|
BeatmapSetsChanged?.Invoke();
|
||||||
BeatmapSetsLoaded = true;
|
BeatmapSetsLoaded = true;
|
||||||
@ -129,9 +130,7 @@ namespace osu.Game.Screens.Select
|
|||||||
loadBeatmapSets(beatmaps.GetAllUsableBeatmapSetsEnumerable());
|
loadBeatmapSets(beatmaps.GetAllUsableBeatmapSetsEnumerable());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RemoveBeatmapSet(BeatmapSetInfo beatmapSet)
|
public void RemoveBeatmapSet(BeatmapSetInfo beatmapSet) => Schedule(() =>
|
||||||
{
|
|
||||||
Schedule(() =>
|
|
||||||
{
|
{
|
||||||
var existingSet = beatmapSets.FirstOrDefault(b => b.BeatmapSet.ID == beatmapSet.ID);
|
var existingSet = beatmapSets.FirstOrDefault(b => b.BeatmapSet.ID == beatmapSet.ID);
|
||||||
|
|
||||||
@ -141,7 +140,6 @@ namespace osu.Game.Screens.Select
|
|||||||
root.RemoveChild(existingSet);
|
root.RemoveChild(existingSet);
|
||||||
itemsCache.Invalidate();
|
itemsCache.Invalidate();
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
|
||||||
public void UpdateBeatmapSet(BeatmapSetInfo beatmapSet) => Schedule(() =>
|
public void UpdateBeatmapSet(BeatmapSetInfo beatmapSet) => Schedule(() =>
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user