diff --git a/OsmAnd-java/src/net/osmand/osm/AbstractPoiType.java b/OsmAnd-java/src/net/osmand/osm/AbstractPoiType.java index 79b7355d25..c56e70dd84 100644 --- a/OsmAnd-java/src/net/osmand/osm/AbstractPoiType.java +++ b/OsmAnd-java/src/net/osmand/osm/AbstractPoiType.java @@ -19,6 +19,7 @@ public abstract class AbstractPoiType { private String poiAdditionalCategory; private List excludedPoiAdditionalCategories; private String synonyms; + private String enSynonyms; private String enTranslation; private String translation; @@ -84,10 +85,10 @@ public abstract class AbstractPoiType { } public String getEnSynonyms() { - if(synonyms == null) { - synonyms = registry.getEnSynonyms(this); + if(enSynonyms == null) { + enSynonyms = registry.getEnSynonyms(this); } - return synonyms; + return enSynonyms; } public String getEnTranslation() { diff --git a/OsmAnd/src/net/osmand/plus/search/QuickSearchListAdapter.java b/OsmAnd/src/net/osmand/plus/search/QuickSearchListAdapter.java index 7463db941d..8494d48adf 100644 --- a/OsmAnd/src/net/osmand/plus/search/QuickSearchListAdapter.java +++ b/OsmAnd/src/net/osmand/plus/search/QuickSearchListAdapter.java @@ -369,16 +369,16 @@ public class QuickSearchListAdapter extends ArrayAdapter { String desc = listItem.getTypeName(); if (listItem.getSearchResult().object instanceof AbstractPoiType) { - AbstractPoiType abstractPoiType = (AbstractPoiType) listItem.getSearchResult().object; - String synonyms = abstractPoiType.getSynonyms(); - String enSynonyms = abstractPoiType.getEnSynonyms(); QuickSearchHelper searchHelper = app.getSearchUICore(); SearchUICore searchUICore = searchHelper.getCore(); String searchPhrase = searchUICore.getPhrase().getText(true); if (!searchPhrase.isEmpty()) { + AbstractPoiType abstractPoiType = (AbstractPoiType) listItem.getSearchResult().object; SearchPhrase.NameStringMatcher nm = new SearchPhrase.NameStringMatcher(searchPhrase, CollatorStringMatcher.StringMatcherMode.CHECK_STARTS_FROM_SPACE); String[] syn = new String[0]; + String synonyms = abstractPoiType.getSynonyms(); + String enSynonyms = abstractPoiType.getEnSynonyms(); if (app.getLanguage().equals("en")) { syn = enSynonyms.split(";");