Move token request construction to LoadAsyncComplete to better allow DI usage

This commit is contained in:
Dean Herbert
2021-03-23 16:05:40 +09:00
parent 571124669d
commit 3cd8bf2d7f
2 changed files with 8 additions and 3 deletions

View File

@ -28,11 +28,11 @@ namespace osu.Game.Screens.Play
{
}
[BackgroundDependencyLoader]
private void load()
protected override void LoadAsyncComplete()
{
Token = null;
base.LoadAsyncComplete();
// Token request construction should happen post-load to allow derived classes to potentially prepare DI backings that are used to create the request.
bool failed = false;
var req = CreateTokenRequestRequest();