Merge pull request #8990 from osmandapp/create_custom_poi

fix subCategories
This commit is contained in:
vshcherb 2020-05-18 16:21:49 +02:00 committed by GitHub
commit de9ff6760f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -82,14 +82,12 @@ public class AmenityIndexRepositoryBinary implements AmenityIndexRepository {
PoiCategory poiCategory = poiTypes.getPoiCategoryByName(categoryName);
List<String> deltaSubCategories = null;
for (List<String> subList : subCategories) {
for (String subCategory : subList) {
if (poiCategory.getPoiTypeByKeyName(subCategory) != null) {
if (deltaSubCategories == null) {
deltaSubCategories = new ArrayList<>();
}
deltaSubCategories.add(subCategory);
for (String subCategory : subCategories.get(i)) {
if (poiCategory.getPoiTypeByKeyName(subCategory) == null) {
if (deltaSubCategories == null) {
deltaSubCategories = new ArrayList<>();
}
deltaSubCategories.add(subCategory);
}
}
if (deltaSubCategories != null) {