diff --git a/OsmAnd-java/src/main/java/net/osmand/search/core/SearchCoreFactory.java b/OsmAnd-java/src/main/java/net/osmand/search/core/SearchCoreFactory.java index a9cb3dbd57..11585e0d5f 100644 --- a/OsmAnd-java/src/main/java/net/osmand/search/core/SearchCoreFactory.java +++ b/OsmAnd-java/src/main/java/net/osmand/search/core/SearchCoreFactory.java @@ -731,6 +731,7 @@ public class SearchCoreFactory { if (translatedNames.isEmpty()) { translatedNames = types.getAllTranslatedNames(false); topVisibleFilters = types.getTopVisibleFilters(); + topVisibleFilters.remove(types.getOsmwiki()); categories = types.getCategories(false); } } diff --git a/OsmAnd/src/net/osmand/plus/poi/PoiFiltersHelper.java b/OsmAnd/src/net/osmand/plus/poi/PoiFiltersHelper.java index 289791bf09..ed1c11dfc2 100644 --- a/OsmAnd/src/net/osmand/plus/poi/PoiFiltersHelper.java +++ b/OsmAnd/src/net/osmand/plus/poi/PoiFiltersHelper.java @@ -54,7 +54,6 @@ public class PoiFiltersHelper { private PoiUIFilter searchByNamePOIFilter; private PoiUIFilter customPOIFilter; private PoiUIFilter showAllPOIFilter; - private PoiUIFilter localWikiPoiFilter; private PoiUIFilter topWikiPoiFilter; private List cacheTopStandardFilters; private Set selectedPoiFilters = new TreeSet<>(); @@ -120,20 +119,6 @@ public class PoiFiltersHelper { return customPOIFilter; } - public PoiUIFilter getLocalWikiPOIFilter() { - if (localWikiPoiFilter == null) { - PoiType place = application.getPoiTypes().getPoiTypeByKey(WIKI_PLACE); - if (place != null && !Algorithms.isEmpty(application.getLanguage())) { - PoiUIFilter filter = new PoiUIFilter(place, application, " " + - application.getLangTranslation(application.getLanguage())); - filter.setSavedFilterByName("wiki:lang:" + application.getLanguage()); - filter.setStandardFilter(true); - localWikiPoiFilter = filter; - } - } - return localWikiPoiFilter; - } - public void prepareTopWikiFilter(@NonNull PoiUIFilter wiki) { boolean prepareByDefault = true; Bundle wikiSettings = WikipediaPoiMenu.getWikiPoiSettings(application); @@ -217,8 +202,7 @@ public class PoiFiltersHelper { } } PoiUIFilter ff = getFilterById(filterId, getCustomPOIFilter(), getSearchByNamePOIFilter(), - getTopWikiPoiFilter(), getLocalWikiPOIFilter(), getShowAllPOIFilter(), - getNominatimPOIFilter(), getNominatimAddressFilter()); + getTopWikiPoiFilter(), getShowAllPOIFilter(), getNominatimPOIFilter(), getNominatimAddressFilter()); if (ff != null) { return ff; } @@ -284,9 +268,6 @@ public class PoiFiltersHelper { top = new ArrayList<>(); // user defined top.addAll(getUserDefinedPoiFilters(true)); - if (getLocalWikiPOIFilter() != null) { - top.add(getLocalWikiPOIFilter()); - } // default MapPoiTypes poiTypes = application.getPoiTypes(); for (AbstractPoiType t : poiTypes.getTopVisibleFilters()) { diff --git a/OsmAnd/src/net/osmand/plus/search/QuickSearchHelper.java b/OsmAnd/src/net/osmand/plus/search/QuickSearchHelper.java index c0fe0f49a2..81d257205a 100644 --- a/OsmAnd/src/net/osmand/plus/search/QuickSearchHelper.java +++ b/OsmAnd/src/net/osmand/plus/search/QuickSearchHelper.java @@ -111,9 +111,9 @@ public class QuickSearchHelper implements ResourceListener { for (CustomSearchPoiFilter udf : poiFilters.getUserDefinedPoiFilters(false)) { core.addCustomSearchPoiFilter(udf, 0); } - PoiUIFilter localWikiPoiFilter = poiFilters.getLocalWikiPOIFilter(); - if (localWikiPoiFilter != null) { - core.addCustomSearchPoiFilter(localWikiPoiFilter, 1); + PoiUIFilter topWikiPoiFilter = poiFilters.getTopWikiPoiFilter(); + if (topWikiPoiFilter != null) { + core.addCustomSearchPoiFilter(topWikiPoiFilter, 1); } core.addCustomSearchPoiFilter(poiFilters.getShowAllPOIFilter(), 1); refreshFilterOrders();