Move BeatmapInfo's SearchableTerms implementation to interface

This commit is contained in:
Dean Herbert
2021-10-04 17:00:22 +09:00
parent 51b7dce16f
commit f293e008d9
3 changed files with 13 additions and 6 deletions

View File

@ -152,10 +152,7 @@ namespace osu.Game.Beatmaps
[JsonIgnore]
public DifficultyRating DifficultyRating => BeatmapDifficultyCache.GetDifficultyRating(StarDifficulty);
public string[] SearchableTerms => new[]
{
Version
}.Concat(Metadata?.SearchableTerms ?? Enumerable.Empty<string>()).Where(s => !string.IsNullOrEmpty(s)).ToArray();
public IEnumerable<string> SearchableTerms => ((IBeatmapInfo)this).SearchableTerms;
public override string ToString() => ((IBeatmapInfo)this).DisplayTitle;