mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 16:02:55 +08:00
Merge pull request #27112 from Stoppedpuma/alias-author-creator
Add aliases "author" and "mapper" for creator results
This commit is contained in:
commit
60e0eea9bc
@ -274,10 +274,12 @@ namespace osu.Game.Tests.NonVisual.Filtering
|
||||
Assert.IsTrue(filterCriteria.OnlineStatus.IsUpperInclusive);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestApplyCreatorQueries()
|
||||
[TestCase("creator")]
|
||||
[TestCase("author")]
|
||||
[TestCase("mapper")]
|
||||
public void TestApplyCreatorQueries(string keyword)
|
||||
{
|
||||
const string query = "beatmap specifically by creator=my_fav";
|
||||
string query = $"beatmap specifically by {keyword}=my_fav";
|
||||
var filterCriteria = new FilterCriteria();
|
||||
FilterQueryParser.ApplyQueries(filterCriteria, query);
|
||||
Assert.AreEqual("beatmap specifically by", filterCriteria.SearchText.Trim());
|
||||
|
@ -68,6 +68,8 @@ namespace osu.Game.Screens.Select
|
||||
return TryUpdateCriteriaRange(ref criteria.OnlineStatus, op, value, tryParseEnum);
|
||||
|
||||
case "creator":
|
||||
case "author":
|
||||
case "mapper":
|
||||
return TryUpdateCriteriaText(ref criteria.Creator, op, value);
|
||||
|
||||
case "artist":
|
||||
|
Loading…
Reference in New Issue
Block a user