better break check

This commit is contained in:
sonora 2016-06-10 16:51:03 +02:00
parent f7d5c11e1c
commit 4ba9538aa2

View file

@ -213,9 +213,9 @@ public class PoiUIFilter implements SearchPoiTypeFilter, Comparable<PoiUIFilter>
amenityList.remove(amenityList.size() - 1); amenityList.remove(amenityList.size() - 1);
} }
} }
if (amenityList.size() == 0 && isAutomaticallyIncreaseSearch() && !SearchPOIActivity.stopSearching) { if (amenityList.size() == 0 && isAutomaticallyIncreaseSearch()) {
int step = 5; int step = 5;
while (amenityList.size() == 0 && step-- > 0 && isSearchFurtherAvailable()) { while (amenityList.size() == 0 && step-- > 0 && isSearchFurtherAvailable() && !SearchPOIActivity.stopSearching) {
amenityList = searchFurther(lat, lon, matcher); amenityList = searchFurther(lat, lon, matcher);
} }
} }