Change method calls loadAttractionsFromLocation by considering new parameter to decide between closest nearby call or an usual nearby call

This commit is contained in:
neslihanturan 2018-09-18 14:16:05 +03:00
parent 735b4430c6
commit 7de3ad8b89

View file

@ -435,7 +435,7 @@ public class NearbyActivity extends NavigationBaseActivity implements LocationUp
bundle.putString("CurLatLng", gsonCurLatLng);
placesDisposable = Observable.fromCallable(() -> nearbyController
.loadAttractionsFromLocation(curLatLng))
.loadAttractionsFromLocation(curLatLng, false))
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(this::populatePlaces,
@ -627,7 +627,7 @@ public class NearbyActivity extends NavigationBaseActivity implements LocationUp
|| curLatLng.getLongitude() >= nearbyMapFragment.boundaryCoordinates[3].getLongitude())) {
// populate places
placesDisposable = Observable.fromCallable(() -> nearbyController
.loadAttractionsFromLocation(curLatLng))
.loadAttractionsFromLocation(curLatLng, false))
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(this::populatePlaces,