Fix some incorrectly invoked async calls

This commit is contained in:
Dean Herbert
2021-07-02 14:43:48 +09:00
parent 7b4317be9a
commit f2d9d78455
4 changed files with 14 additions and 8 deletions

View File

@ -491,6 +491,10 @@ namespace osu.Game
public override Task Import(params ImportTask[] imports)
{
// encapsulate task as we don't want to begin the import process until in a ready state.
// ReSharper disable once AsyncVoidLambda
// TODO: This is bad because `new Task` doesn't have a Func<Task?> override.
// Only used for android imports and a bit of a mess. Probably needs rethinking overall.
var importTask = new Task(async () => await base.Import(imports).ConfigureAwait(false));
waitForReady(() => this, _ => importTask.Start());