1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-19 11:23:23 +08:00

Remove unnecessary schedule

This commit is contained in:
Dean Herbert 2022-03-21 23:54:47 +09:00
parent 33acc5d720
commit 9a2691c1bc

View File

@ -63,26 +63,22 @@ namespace osu.Game.Skinning.Editor
}
var editor = new SkinEditor();
editor.State.BindValueChanged(visibility => updateComponentVisibility());
skinEditor = editor;
// Schedule ensures that if `Show` is called before this overlay is loaded,
// it will not throw (LoadComponentAsync requires the load target to be in a loaded state).
Schedule(() =>
if (editor != skinEditor)
return;
LoadComponentAsync(editor, _ =>
{
if (editor != skinEditor)
return;
LoadComponentAsync(editor, _ =>
{
if (editor != skinEditor)
return;
AddInternal(editor);
AddInternal(editor);
SetTarget(lastTargetScreen);
});
SetTarget(lastTargetScreen);
});
}