1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 13:42:56 +08:00

Expand out on to multiple lines

This commit is contained in:
Dean Herbert 2018-08-20 16:06:12 +09:00
parent 65dc9f44e5
commit 295ccabf64

View File

@ -504,16 +504,25 @@ namespace osu.Game
// schedule is here to ensure that all component loads are done after LoadComplete is run (and thus all dependencies are cached).
// with some better organisation of LoadComplete to do construction and dependency caching in one step, followed by calls to loadComponentSingleFile,
// we could avoid the need for scheduling altogether.
Schedule(() => { asyncLoadStream = asyncLoadStream?.ContinueWith(async t =>
Schedule(() =>
{
try
if (asyncLoadStream != null)
{
await LoadComponentAsync(d, add);
//chain with existing load stream
asyncLoadStream = asyncLoadStream.ContinueWith(async t =>
{
try
{
await LoadComponentAsync(d, add);
}
catch (OperationCanceledException)
{
}
});
}
catch (OperationCanceledException)
{
}
}) ?? LoadComponentAsync(d, add); });
else
asyncLoadStream = LoadComponentAsync(d, add);
});
}
public bool OnPressed(GlobalAction action)