Fix search

This commit is contained in:
Alexey Kulish 2017-03-24 21:33:09 +03:00
parent 480019b8c3
commit 82eb65a47c

View file

@ -1130,7 +1130,7 @@ public class QuickSearchDialogFragment extends DialogFragment implements OsmAndC
private void runSearch(String text) { private void runSearch(String text) {
showProgressBar(); showProgressBar();
SearchSettings settings = searchUICore.getPhrase().getSettings(); SearchSettings settings = searchUICore.getSearchSettings();
if (settings.getRadiusLevel() != 1) { if (settings.getRadiusLevel() != 1) {
searchUICore.updateSettings(settings.setRadiusLevel(1)); searchUICore.updateSettings(settings.setRadiusLevel(1));
} }
@ -1308,7 +1308,7 @@ public class QuickSearchDialogFragment extends DialogFragment implements OsmAndC
searchEditText.setSelection(txt.length()); searchEditText.setSelection(txt.length());
buttonToolbarView.setVisibility(View.VISIBLE); buttonToolbarView.setVisibility(View.VISIBLE);
updateToolbarButton(); updateToolbarButton();
SearchSettings settings = searchUICore.getPhrase().getSettings(); SearchSettings settings = searchUICore.getSearchSettings();
if (settings.getRadiusLevel() != 1) { if (settings.getRadiusLevel() != 1) {
searchUICore.updateSettings(settings.setRadiusLevel(1)); searchUICore.updateSettings(settings.setRadiusLevel(1));
} }
@ -1347,7 +1347,7 @@ public class QuickSearchDialogFragment extends DialogFragment implements OsmAndC
@Override @Override
public void onClick(View v) { public void onClick(View v) {
if (!interruptedSearch) { if (!interruptedSearch) {
SearchSettings settings = searchUICore.getPhrase().getSettings(); SearchSettings settings = searchUICore.getSearchSettings();
searchUICore.updateSettings(settings.setRadiusLevel(settings.getRadiusLevel() + 1)); searchUICore.updateSettings(settings.setRadiusLevel(settings.getRadiusLevel() + 1));
} }
runCoreSearch(searchQuery, false, true); runCoreSearch(searchQuery, false, true);
@ -1591,7 +1591,7 @@ public class QuickSearchDialogFragment extends DialogFragment implements OsmAndC
searchEditText.setText(txt); searchEditText.setText(txt);
searchEditText.setSelection(txt.length()); searchEditText.setSelection(txt.length());
updateToolbarButton(); updateToolbarButton();
SearchSettings settings = searchUICore.getPhrase().getSettings(); SearchSettings settings = searchUICore.getSearchSettings();
if (settings.getRadiusLevel() != 1) { if (settings.getRadiusLevel() != 1) {
searchUICore.updateSettings(settings.setRadiusLevel(1)); searchUICore.updateSettings(settings.setRadiusLevel(1));
} }