1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 12:02:55 +08:00

Fix settings overlay not invalidating presence on filter change

This commit is contained in:
Salman Ahmed 2022-04-22 20:34:00 +03:00
parent 2961c383f6
commit 4c7c611218
2 changed files with 33 additions and 5 deletions

View File

@ -100,9 +100,23 @@ namespace osu.Game.Overlays.Settings
public IEnumerable<string> Keywords { get; set; }
public override bool IsPresent => base.IsPresent && MatchingFilter;
private bool matchingFilter;
public bool MatchingFilter { get; set; } = true;
public bool MatchingFilter
{
get => matchingFilter;
set
{
bool wasPresent = IsPresent;
matchingFilter = value;
if (IsPresent != wasPresent)
Invalidate(Invalidation.Presence);
}
}
public override bool IsPresent => base.IsPresent && MatchingFilter;
public bool FilteringActive { get; set; }

View File

@ -21,8 +21,6 @@ namespace osu.Game.Overlays.Settings
protected FillFlowContainer FlowContent;
protected override Container<Drawable> Content => FlowContent;
public override bool IsPresent => base.IsPresent && MatchingFilter;
private IBindable<SettingsSection> selectedSection;
private Box dim;
@ -40,7 +38,23 @@ namespace osu.Game.Overlays.Settings
private const int header_size = 24;
private const int border_size = 4;
public bool MatchingFilter { get; set; } = true;
private bool matchingFilter;
public bool MatchingFilter
{
get => matchingFilter;
set
{
bool wasPresent = IsPresent;
matchingFilter = value;
if (IsPresent != wasPresent)
Invalidate(Invalidation.Presence);
}
}
public override bool IsPresent => base.IsPresent && MatchingFilter;
public bool FilteringActive { get; set; }