mirror of
https://github.com/ppy/osu.git
synced 2025-01-19 12:22:57 +08:00
Fix being able to commit with an empty query and clearing the results
This commit is contained in:
parent
70e12e5d9b
commit
bb103d7878
@ -176,18 +176,18 @@ namespace osu.Game.Overlays
|
|||||||
private string lastQuery = string.Empty;
|
private string lastQuery = string.Empty;
|
||||||
private void updateSets()
|
private void updateSets()
|
||||||
{
|
{
|
||||||
if (!IsLoaded) return;
|
if (!IsLoaded || Header.Tabs.Current.Value == DirectTab.Search && Filter.Search.Text == string.Empty) return;
|
||||||
|
|
||||||
BeatmapSets = null;
|
BeatmapSets = null;
|
||||||
ResultAmounts = null;
|
ResultAmounts = null;
|
||||||
getSetsRequest?.Cancel();
|
getSetsRequest?.Cancel();
|
||||||
|
|
||||||
if (api == null || Filter.Search.Text == string.Empty && Header.Tabs.Current.Value == DirectTab.Search) return;
|
if (api == null) return;
|
||||||
|
|
||||||
getSetsRequest = new GetBeatmapSetsRequest(lastQuery,
|
getSetsRequest = new GetBeatmapSetsRequest(lastQuery,
|
||||||
((FilterControl)Filter).Ruleset.Value,
|
((FilterControl)Filter).Ruleset.Value,
|
||||||
Filter.DisplayStyleControl.Dropdown.Current.Value,
|
Filter.DisplayStyleControl.Dropdown.Current.Value,
|
||||||
Filter.Tabs.Current.Value); //todo: sort direction
|
Filter.Tabs.Current.Value); //todo: sort direction (?)
|
||||||
|
|
||||||
getSetsRequest.Success += r =>
|
getSetsRequest.Success += r =>
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user