1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 02:02:53 +08:00

Move schedule call outwards

This commit is contained in:
Dean Herbert 2020-11-16 16:49:31 +09:00
parent 9a7fdb2b7e
commit 709370c69b

View File

@ -198,10 +198,13 @@ namespace osu.Game
SkinManager.ItemRemoved.BindValueChanged(weakRemovedInfo => SkinManager.ItemRemoved.BindValueChanged(weakRemovedInfo =>
{ {
if (weakRemovedInfo.NewValue.TryGetTarget(out var removedInfo)) if (weakRemovedInfo.NewValue.TryGetTarget(out var removedInfo))
{
Schedule(() =>
{ {
// check the removed skin is not the current user choice. if it is, switch back to default. // check the removed skin is not the current user choice. if it is, switch back to default.
if (removedInfo.ID == SkinManager.CurrentSkinInfo.Value.ID) if (removedInfo.ID == SkinManager.CurrentSkinInfo.Value.ID)
Schedule(() => SkinManager.CurrentSkinInfo.Value = SkinInfo.Default); SkinManager.CurrentSkinInfo.Value = SkinInfo.Default;
});
} }
}); });