mirror of
https://github.com/ppy/osu
synced 2024-12-14 10:57:41 +00:00
Fix BeatmapCarousel
signalling it is finished loading before catching up on realm changes
This commit is contained in:
parent
6c46fd6931
commit
1dabf6c8a5
@ -126,14 +126,8 @@ namespace osu.Game.Screens.Select
|
||||
|
||||
applyActiveCriteria(false);
|
||||
|
||||
// Run on late scheduler want to ensure this runs after all pending UpdateBeatmapSet / RemoveBeatmapSet operations are run.
|
||||
SchedulerAfterChildren.Add(() =>
|
||||
{
|
||||
BeatmapSetsChanged?.Invoke();
|
||||
BeatmapSetsLoaded = true;
|
||||
|
||||
itemsCache.Invalidate();
|
||||
});
|
||||
if (loadedTestBeatmaps)
|
||||
signalBeatmapsLoaded();
|
||||
}
|
||||
|
||||
private readonly List<CarouselItem> visibleItems = new List<CarouselItem>();
|
||||
@ -249,6 +243,7 @@ namespace osu.Game.Screens.Select
|
||||
RemoveBeatmapSet(realmFactory.Context.Find<BeatmapSetInfo>(s));
|
||||
}
|
||||
|
||||
signalBeatmapsLoaded();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -547,6 +542,16 @@ namespace osu.Game.Screens.Select
|
||||
}
|
||||
}
|
||||
|
||||
private void signalBeatmapsLoaded()
|
||||
{
|
||||
Debug.Assert(BeatmapSetsLoaded == false);
|
||||
|
||||
BeatmapSetsChanged?.Invoke();
|
||||
BeatmapSetsLoaded = true;
|
||||
|
||||
itemsCache.Invalidate();
|
||||
}
|
||||
|
||||
private float? scrollTarget;
|
||||
|
||||
/// <summary>
|
||||
|
Loading…
Reference in New Issue
Block a user