mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 10:52:53 +08:00
Schedule entire operation for safety
Also removes a redundant list copy.
This commit is contained in:
parent
78e590d25d
commit
3b49b7461e
@ -133,9 +133,12 @@ namespace osu.Game.Overlays.Settings.Sections
|
||||
{
|
||||
if (weakItem.NewValue.TryGetTarget(out var item))
|
||||
{
|
||||
List<SkinInfo> newDropdownItems = skinDropdown.Items.Where(i => !i.Equals(item)).Append(item).ToList();
|
||||
sortUserSkins(newDropdownItems);
|
||||
Schedule(() => skinDropdown.Items = newDropdownItems.ToArray());
|
||||
Schedule(() =>
|
||||
{
|
||||
List<SkinInfo> newDropdownItems = skinDropdown.Items.Where(i => !i.Equals(item)).Append(item).ToList();
|
||||
sortUserSkins(newDropdownItems);
|
||||
skinDropdown.Items = newDropdownItems;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user