Fix #4735
This commit is contained in:
parent
12748cb857
commit
bc0bdcf99c
1 changed files with 14 additions and 11 deletions
|
@ -1135,18 +1135,21 @@ public class QuickSearchDialogFragment extends DialogFragment implements OsmAndC
|
||||||
for (SearchResult sr : res.getCurrentSearchResults()) {
|
for (SearchResult sr : res.getCurrentSearchResults()) {
|
||||||
rows.add(new QuickSearchListItem(app, sr));
|
rows.add(new QuickSearchListItem(app, sr));
|
||||||
}
|
}
|
||||||
if (OsmandPlugin.getEnabledPlugin(OsmandRasterMapsPlugin.class) != null) {
|
rows.add(new QuickSearchButtonListItem(app, R.drawable.ic_world_globe_dark,
|
||||||
rows.add(new QuickSearchButtonListItem(app, R.drawable.ic_world_globe_dark,
|
app.getString(R.string.search_online_address), new OnClickListener() {
|
||||||
app.getString(R.string.search_online_address), new OnClickListener() {
|
@Override
|
||||||
@Override
|
public void onClick(View view) {
|
||||||
public void onClick(View view) {
|
final OsmandSettings settings = app.getSettings();
|
||||||
startOnlineSearch();
|
if (!settings.isInternetConnectionAvailable()) {
|
||||||
mainSearchFragment.getAdapter().clear();
|
Toast.makeText(app, R.string.internet_not_available, Toast.LENGTH_LONG).show();
|
||||||
updateTabbarVisibility(false);
|
return;
|
||||||
openKeyboard();
|
|
||||||
}
|
}
|
||||||
}));
|
startOnlineSearch();
|
||||||
}
|
mainSearchFragment.getAdapter().clear();
|
||||||
|
updateTabbarVisibility(false);
|
||||||
|
openKeyboard();
|
||||||
|
}
|
||||||
|
}));
|
||||||
rows.add(new QuickSearchButtonListItem(app, R.drawable.ic_action_search_dark,
|
rows.add(new QuickSearchButtonListItem(app, R.drawable.ic_action_search_dark,
|
||||||
app.getString(R.string.custom_search), new OnClickListener() {
|
app.getString(R.string.custom_search), new OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue