mirror of
https://github.com/ppy/osu.git
synced 2024-11-14 17:57:38 +08:00
Make method to flush filter requests
This commit is contained in:
parent
fb2f1224b3
commit
12b6b80d5c
@ -232,7 +232,11 @@ namespace osu.Game.Screens.Select
|
|||||||
|
|
||||||
public bool AllowSelection = true;
|
public bool AllowSelection = true;
|
||||||
|
|
||||||
public bool PendingFilter => filterTask?.Completed == false;
|
public void FlushPendingFilters()
|
||||||
|
{
|
||||||
|
if (filterTask?.Completed == false)
|
||||||
|
Filter(null, false);
|
||||||
|
}
|
||||||
|
|
||||||
public void Filter(FilterCriteria newCriteria = null, bool debounce = true)
|
public void Filter(FilterCriteria newCriteria = null, bool debounce = true)
|
||||||
{
|
{
|
||||||
|
@ -198,10 +198,9 @@ namespace osu.Game.Screens.Select
|
|||||||
|
|
||||||
private void carouselRaisedStart()
|
private void carouselRaisedStart()
|
||||||
{
|
{
|
||||||
if (carousel.PendingFilter)
|
// if we have a pending filter operation, we want to run it now.
|
||||||
// if we have a pending filter operation, we want to run it now.
|
// it could change selection (ie. if the ruleset has been changed).
|
||||||
// it could change selection (ie. if the ruleset has been changed).
|
carousel.FlushPendingFilters();
|
||||||
carousel.Filter(null, false);
|
|
||||||
|
|
||||||
if (selectionChangedDebounce?.Completed == false)
|
if (selectionChangedDebounce?.Completed == false)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user