mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 21:52: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);
|
Assert.IsTrue(filterCriteria.OnlineStatus.IsUpperInclusive);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[TestCase("creator")]
|
||||||
public void TestApplyCreatorQueries()
|
[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();
|
var filterCriteria = new FilterCriteria();
|
||||||
FilterQueryParser.ApplyQueries(filterCriteria, query);
|
FilterQueryParser.ApplyQueries(filterCriteria, query);
|
||||||
Assert.AreEqual("beatmap specifically by", filterCriteria.SearchText.Trim());
|
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);
|
return TryUpdateCriteriaRange(ref criteria.OnlineStatus, op, value, tryParseEnum);
|
||||||
|
|
||||||
case "creator":
|
case "creator":
|
||||||
|
case "author":
|
||||||
|
case "mapper":
|
||||||
return TryUpdateCriteriaText(ref criteria.Creator, op, value);
|
return TryUpdateCriteriaText(ref criteria.Creator, op, value);
|
||||||
|
|
||||||
case "artist":
|
case "artist":
|
||||||
|
Loading…
Reference in New Issue
Block a user