1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-18 19:32:55 +08:00

Also handle full mod name (likely irrelevant but might as well)

This commit is contained in:
jhk2601 2024-10-17 17:11:01 -04:00
parent 2ef8720590
commit 9a0356919c

View File

@ -592,7 +592,7 @@ namespace osu.Game.Overlays.Mods
//matchingMod ensures that if an exact mod acronym is typed, it will be selected when Select is pressed (as opposed to being prioritized in arbitrary column order)
ModState? firstMod = columnFlow.Columns.OfType<ModColumn>().FirstOrDefault(m => m.IsPresent)?.AvailableMods.FirstOrDefault(x => x.Visible);
ModState? matchingMod = columnFlow.Columns.OfType<ModColumn>().SelectMany(m => m.AvailableMods).FirstOrDefault(x => x.Mod.Acronym.Equals(SearchTerm, StringComparison.OrdinalIgnoreCase));
ModState? matchingMod = columnFlow.Columns.OfType<ModColumn>().SelectMany(m => m.AvailableMods).FirstOrDefault(x => x.Mod.Acronym.Equals(SearchTerm, StringComparison.OrdinalIgnoreCase) | x.Mod.Name.Equals(SearchTerm, StringComparison.OrdinalIgnoreCase));
if (matchingMod is not null)
{