You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 18, 2024. It is now read-only.
I am using Geoquery to fetch nearest documents from Firestore in Android/Java. I try to paginate data with recyclerview. But somehow, .startAfter(lastVisible) clause makes the query work twice for different bound tasks. So, after first fetch, all queries works twice.
List<GeoQueryBounds> bounds = GeoFireUtils.getGeoHashQueryBounds(center, radiusInM); final List<Task<QuerySnapshot>> nextTasks = new ArrayList<>(); for (GeoQueryBounds b : bounds) { Query nextQuery = db.collection("posts") .whereEqualTo("country_code", sharedpreferences.getString("country_code", "")) .orderBy("geohash") .startAt(b.startHash) .endAt(b.endHash) .startAfter(lastVisible) .limit(10); nextTasks.add(nextQuery.get()); }