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

Fix back-to-front filter logic

Was copied across from a place which was checking for `match` and
applied verbatim to a place that was `filter`. Which are polar
opposites.
This commit is contained in:
Dean Herbert 2022-09-01 19:27:33 +09:00
parent 148e487c02
commit 1524623624

View File

@ -129,12 +129,13 @@ namespace osu.Game.Screens.Select.Carousel
public override void Filter(FilterCriteria criteria)
{
base.Filter(criteria);
bool match = Items.All(i => i.Filtered.Value);
match &= criteria.Sort != SortMode.DateRanked || BeatmapSet?.DateRanked != null;
match &= criteria.Sort != SortMode.DateSubmitted || BeatmapSet?.DateSubmitted != null;
bool filtered = Items.All(i => i.Filtered.Value);
Filtered.Value = match;
filtered |= criteria.Sort == SortMode.DateRanked && BeatmapSet?.DateRanked == null;
filtered |= criteria.Sort == SortMode.DateSubmitted && BeatmapSet?.DateSubmitted == null;
Filtered.Value = filtered;
}
public override string ToString() => BeatmapSet.ToString();