mirror of
https://github.com/ppy/osu.git
synced 2024-11-14 16:37:26 +08:00
Fix single file component loading not actually working correctly
This commit is contained in:
parent
df18508bd6
commit
4b54c65d3f
@ -506,22 +506,24 @@ namespace osu.Game
|
|||||||
// we could avoid the need for scheduling altogether.
|
// we could avoid the need for scheduling altogether.
|
||||||
Schedule(() =>
|
Schedule(() =>
|
||||||
{
|
{
|
||||||
if (asyncLoadStream != null)
|
var previousLoadStream = asyncLoadStream;
|
||||||
{
|
|
||||||
//chain with existing load stream
|
//chain with existing load stream
|
||||||
asyncLoadStream = asyncLoadStream.ContinueWith(async t =>
|
asyncLoadStream = Task.Run(async () =>
|
||||||
{
|
{
|
||||||
|
if (previousLoadStream != null)
|
||||||
|
await previousLoadStream;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
Logger.Log($"{d}...", LoggingTarget.Debug);
|
||||||
await LoadComponentAsync(d, add);
|
await LoadComponentAsync(d, add);
|
||||||
|
Logger.Log($"{d} ✓", LoggingTarget.Debug);
|
||||||
}
|
}
|
||||||
catch (OperationCanceledException)
|
catch (OperationCanceledException)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
|
||||||
else
|
|
||||||
asyncLoadStream = LoadComponentAsync(d, add);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user