1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 00:47:24 +08:00

Fix dependency not always available due to nested LoadComponentAsync call

This commit is contained in:
Dean Herbert 2021-01-05 13:27:45 +09:00
parent 385c9cd2e2
commit 6b8e1913ee

View File

@ -30,16 +30,16 @@ namespace osu.Game.Screens.Edit
{
}
private Container mainContent;
private LoadingSpinner spinner;
[BackgroundDependencyLoader(true)]
private void load([CanBeNull] BindableBeatDivisor beatDivisor)
{
if (beatDivisor != null)
this.beatDivisor.BindTo(beatDivisor);
Container mainContent;
LoadingSpinner spinner;
Children = new Drawable[]
{
mainContent = new Container
@ -99,6 +99,11 @@ namespace osu.Game.Screens.Edit
}
},
};
}
protected override void LoadComplete()
{
base.LoadComplete();
LoadComponentAsync(CreateMainContent(), content =>
{