1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 17:32:54 +08:00

Fix BeatmapCarousel signalling it is finished loading before catching up on realm changes

This commit is contained in:
Dean Herbert 2022-01-20 16:39:42 +09:00
parent 6c46fd6931
commit 1dabf6c8a5

View File

@ -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>