mirror of
https://github.com/ppy/osu
synced 2024-12-13 18:37:04 +00:00
Remove Thread.Sleep and tidy up new method
This commit is contained in:
parent
cc01878f2b
commit
e98bfec644
@ -277,17 +277,7 @@ namespace osu.Game
|
||||
private void loadComponentSingleFile<T>(T d, Action<T> add)
|
||||
where T : Drawable
|
||||
{
|
||||
Schedule(() =>
|
||||
{
|
||||
if (asyncLoadStream != null)
|
||||
asyncLoadStream = asyncLoadStream.ContinueWith(t =>
|
||||
{
|
||||
Thread.Sleep(100);
|
||||
LoadComponentAsync(d, add).Wait();
|
||||
});
|
||||
else
|
||||
asyncLoadStream = LoadComponentAsync(d, add);
|
||||
});
|
||||
Schedule(() => { asyncLoadStream = asyncLoadStream?.ContinueWith(t => LoadComponentAsync(d, add).Wait()) ?? LoadComponentAsync(d, add); });
|
||||
}
|
||||
|
||||
public bool OnPressed(GlobalAction action)
|
||||
|
Loading…
Reference in New Issue
Block a user