mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 23:53:51 +09:00
Merge pull request #9149 from EVAST9919/beatmap-listing-sort-fix
Fix searching by genre/language not working in beatmap listing overlay
This commit is contained in:
@ -27,7 +27,15 @@ namespace osu.Game.Online.API.Requests
|
||||
|
||||
private string directionString => SortDirection == SortDirection.Descending ? @"desc" : @"asc";
|
||||
|
||||
public SearchBeatmapSetsRequest(string query, RulesetInfo ruleset, Cursor cursor = null, SearchCategory searchCategory = SearchCategory.Any, SortCriteria sortCriteria = SortCriteria.Ranked, SortDirection sortDirection = SortDirection.Descending)
|
||||
public SearchBeatmapSetsRequest(
|
||||
string query,
|
||||
RulesetInfo ruleset,
|
||||
Cursor cursor = null,
|
||||
SearchCategory searchCategory = SearchCategory.Any,
|
||||
SortCriteria sortCriteria = SortCriteria.Ranked,
|
||||
SortDirection sortDirection = SortDirection.Descending,
|
||||
SearchGenre genre = SearchGenre.Any,
|
||||
SearchLanguage language = SearchLanguage.Any)
|
||||
{
|
||||
this.query = string.IsNullOrEmpty(query) ? string.Empty : System.Uri.EscapeDataString(query);
|
||||
this.ruleset = ruleset;
|
||||
@ -36,8 +44,8 @@ namespace osu.Game.Online.API.Requests
|
||||
SearchCategory = searchCategory;
|
||||
SortCriteria = sortCriteria;
|
||||
SortDirection = sortDirection;
|
||||
Genre = SearchGenre.Any;
|
||||
Language = SearchLanguage.Any;
|
||||
Genre = genre;
|
||||
Language = language;
|
||||
}
|
||||
|
||||
protected override WebRequest CreateWebRequest()
|
||||
|
@ -177,7 +177,9 @@ namespace osu.Game.Overlays.BeatmapListing
|
||||
lastResponse?.Cursor,
|
||||
searchControl.Category.Value,
|
||||
sortControl.Current.Value,
|
||||
sortControl.SortDirection.Value);
|
||||
sortControl.SortDirection.Value,
|
||||
searchControl.Genre.Value,
|
||||
searchControl.Language.Value);
|
||||
|
||||
getSetsRequest.Success += response =>
|
||||
{
|
||||
@ -186,6 +188,9 @@ namespace osu.Game.Overlays.BeatmapListing
|
||||
if (sets.Count == 0)
|
||||
noMoreResults = true;
|
||||
|
||||
if (CurrentPage == 0)
|
||||
searchControl.BeatmapSet = sets.FirstOrDefault();
|
||||
|
||||
lastResponse = response;
|
||||
getSetsRequest = null;
|
||||
|
||||
|
Reference in New Issue
Block a user