mirror of https://github.com/ppy/osu
Expand out on to multiple lines
This commit is contained in:
parent
65dc9f44e5
commit
295ccabf64
|
@ -504,16 +504,25 @@ private void loadComponentSingleFile<T>(T d, Action<T> add)
|
|||
// 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)
|
||||
|
|
Loading…
Reference in New Issue