1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 13:22:55 +08:00

FilterTask -> PendingFilter

This commit is contained in:
Dean Herbert 2018-07-18 10:12:14 +09:00
parent f1c3fbe644
commit 9611292f4e
2 changed files with 7 additions and 7 deletions

View File

@ -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;
}
}
}

View File

@ -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();
}