1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-19 07:23:20 +08:00

Fix being able to commit with an empty query and clearing the results

This commit is contained in:
DrabWeb 2017-06-08 06:31:37 -03:00
parent 70e12e5d9b
commit bb103d7878

View File

@ -176,18 +176,18 @@ namespace osu.Game.Overlays
private string lastQuery = string.Empty;
private void updateSets()
{
if (!IsLoaded) return;
if (!IsLoaded || Header.Tabs.Current.Value == DirectTab.Search && Filter.Search.Text == string.Empty) return;
BeatmapSets = null;
ResultAmounts = null;
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,
((FilterControl)Filter).Ruleset.Value,
Filter.DisplayStyleControl.Dropdown.Current.Value,
Filter.Tabs.Current.Value); //todo: sort direction
Filter.Tabs.Current.Value); //todo: sort direction (?)
getSetsRequest.Success += r =>
{