mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 13:22:55 +08:00
FilterTask -> PendingFilter
This commit is contained in:
parent
f1c3fbe644
commit
9611292f4e
@ -530,7 +530,7 @@ namespace osu.Game.Tests.Visual
|
||||
{
|
||||
public new List<DrawableCarouselItem> Items => base.Items;
|
||||
|
||||
public bool PendingFilterTask => FilterTask != null;
|
||||
public bool PendingFilterTask => PendingFilter != null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -329,13 +329,13 @@ namespace osu.Game.Screens.Select
|
||||
|
||||
private FilterCriteria activeCriteria = new FilterCriteria();
|
||||
|
||||
protected ScheduledDelegate FilterTask;
|
||||
protected ScheduledDelegate PendingFilter;
|
||||
|
||||
public bool AllowSelection = true;
|
||||
|
||||
public void FlushPendingFilterOperations()
|
||||
{
|
||||
if (FilterTask?.Completed == false)
|
||||
if (PendingFilter?.Completed == false)
|
||||
{
|
||||
applyActiveCriteria(false, false);
|
||||
Update();
|
||||
@ -356,18 +356,18 @@ namespace osu.Game.Screens.Select
|
||||
|
||||
void perform()
|
||||
{
|
||||
FilterTask = null;
|
||||
PendingFilter = null;
|
||||
|
||||
root.Filter(activeCriteria);
|
||||
itemsCache.Invalidate();
|
||||
if (scroll) scrollPositionCache.Invalidate();
|
||||
}
|
||||
|
||||
FilterTask?.Cancel();
|
||||
FilterTask = null;
|
||||
PendingFilter?.Cancel();
|
||||
PendingFilter = null;
|
||||
|
||||
if (debounce)
|
||||
FilterTask = Scheduler.AddDelayed(perform, 250);
|
||||
PendingFilter = Scheduler.AddDelayed(perform, 250);
|
||||
else
|
||||
perform();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user