mirror of
https://github.com/ppy/osu
synced 2025-03-01 17:11:12 +00:00
Debounce state application events
This commit is contained in:
parent
ca1f5dcada
commit
954d43ef56
@ -125,15 +125,15 @@ namespace osu.Game.Screens.Select.Carousel
|
||||
if (item == null)
|
||||
return;
|
||||
|
||||
ApplyState();
|
||||
Scheduler.AddOnce(ApplyState);
|
||||
|
||||
Item.Filtered.ValueChanged += onStateChange;
|
||||
Item.State.ValueChanged += onStateChange;
|
||||
}
|
||||
|
||||
private void onStateChange(ValueChangedEvent<CarouselItemState> obj) => Schedule(ApplyState);
|
||||
private void onStateChange(ValueChangedEvent<CarouselItemState> obj) => Scheduler.AddOnce(ApplyState);
|
||||
|
||||
private void onStateChange(ValueChangedEvent<bool> _) => Schedule(ApplyState);
|
||||
private void onStateChange(ValueChangedEvent<bool> _) => Scheduler.AddOnce(ApplyState);
|
||||
|
||||
protected virtual void ApplyState()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user