1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 18:47:27 +08:00

Remove all unnecessary usage of IHasFilterableChildren

This commit is contained in:
Bartłomiej Dach 2022-11-16 15:54:52 +09:00 committed by Dean Herbert
parent 96e19d4d84
commit 24deb5f5f4
3 changed files with 2 additions and 8 deletions

View File

@ -62,7 +62,6 @@ namespace osu.Game.Tests.Visual.Settings
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")))
));

View File

@ -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 @@ using osuTK;
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 @@ namespace osu.Game.Overlays.Settings
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;

View File

@ -8,7 +8,6 @@ using osu.Framework.Graphics;
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 @@ using osu.Game.Graphics;
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 @@ namespace osu.Game.Overlays.Settings
protected abstract LocalisableString Header { get; }
public IEnumerable<IFilterable> FilterableChildren => Children.OfType<IFilterable>();
public virtual IEnumerable<LocalisableString> FilterTerms => new[] { Header };
public bool MatchingFilter