mirror of https://github.com/ppy/osu
Remove all unnecessary usage of `IHasFilterableChildren`
This commit is contained in:
parent
96e19d4d84
commit
24deb5f5f4
|
@ -62,7 +62,6 @@ public void TestFiltering([Values] bool beforeLoad)
|
|||
section.Children.Where(f => f.IsPresent)
|
||||
.OfType<ISettingsItem>()
|
||||
.OfType<IFilterable>()
|
||||
.Where(f => !(f is IHasFilterableChildren))
|
||||
.All(f => f.FilterTerms.Any(t => t.ToString().Contains("scaling")))
|
||||
));
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Graphics;
|
||||
|
@ -19,7 +18,7 @@
|
|||
|
||||
namespace osu.Game.Overlays.Settings
|
||||
{
|
||||
public abstract partial class SettingsSection : Container, IHasFilterableChildren
|
||||
public abstract partial class SettingsSection : Container, IFilterable
|
||||
{
|
||||
protected FillFlowContainer FlowContent;
|
||||
protected override Container<Drawable> Content => FlowContent;
|
||||
|
@ -33,7 +32,6 @@ public abstract partial class SettingsSection : Container, IHasFilterableChildre
|
|||
public abstract Drawable CreateIcon();
|
||||
public abstract LocalisableString Header { get; }
|
||||
|
||||
public IEnumerable<IFilterable> FilterableChildren => Children.OfType<IFilterable>();
|
||||
public virtual IEnumerable<LocalisableString> FilterTerms => new[] { Header };
|
||||
|
||||
public const int ITEM_SPACING = 14;
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Framework.Testing;
|
||||
|
@ -17,7 +16,7 @@
|
|||
namespace osu.Game.Overlays.Settings
|
||||
{
|
||||
[ExcludeFromDynamicCompile]
|
||||
public abstract partial class SettingsSubsection : FillFlowContainer, IHasFilterableChildren
|
||||
public abstract partial class SettingsSubsection : FillFlowContainer, IFilterable
|
||||
{
|
||||
protected override Container<Drawable> Content => FlowContent;
|
||||
|
||||
|
@ -25,8 +24,6 @@ public abstract partial class SettingsSubsection : FillFlowContainer, IHasFilter
|
|||
|
||||
protected abstract LocalisableString Header { get; }
|
||||
|
||||
public IEnumerable<IFilterable> FilterableChildren => Children.OfType<IFilterable>();
|
||||
|
||||
public virtual IEnumerable<LocalisableString> FilterTerms => new[] { Header };
|
||||
|
||||
public bool MatchingFilter
|
||||
|
|
Loading…
Reference in New Issue