From d771451aabf2771bce3e34ba9a1efc22bf701d06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20P=C3=B3=C5=82grabia?= Date: Tue, 4 Oct 2016 22:33:30 +0200 Subject: [PATCH] Avoiding unneccessary google api calls when there is no more data. --- .../pl/tpolgrabia/urbanexplorer/fragments/PlacesFragment.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/pl/tpolgrabia/urbanexplorer/fragments/PlacesFragment.java b/app/src/main/java/pl/tpolgrabia/urbanexplorer/fragments/PlacesFragment.java index acc43cc..64a04aa 100644 --- a/app/src/main/java/pl/tpolgrabia/urbanexplorer/fragments/PlacesFragment.java +++ b/app/src/main/java/pl/tpolgrabia/urbanexplorer/fragments/PlacesFragment.java @@ -177,7 +177,7 @@ public class PlacesFragment extends Fragment { }); lg.debug("Fetching nearby places {}", location); - if (places == null || places.isEmpty()) { + if ((places == null || places.isEmpty()) && !noMoreResults) { fetchNearbyPlacesAndPresent(location); }