mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-30 22:34:02 +01:00
Refactor curlatLng to currentLatLng (#5646)
Co-authored-by: Aahlad <aahladkethineeedi@gmail.com>
This commit is contained in:
parent
cd337b000e
commit
a45ab9cf16
14 changed files with 102 additions and 102 deletions
|
|
@ -121,7 +121,7 @@ public class ContributionsFragment
|
|||
@Inject
|
||||
SessionManager sessionManager;
|
||||
|
||||
private LatLng curLatLng;
|
||||
private LatLng currentLatLng;
|
||||
|
||||
private boolean isFragmentAttachedBefore = false;
|
||||
private View checkBoxView;
|
||||
|
|
@ -542,9 +542,9 @@ public class ContributionsFragment
|
|||
|
||||
|
||||
private void updateClosestNearbyCardViewInfo() {
|
||||
curLatLng = locationManager.getLastLocation();
|
||||
currentLatLng = locationManager.getLastLocation();
|
||||
compositeDisposable.add(Observable.fromCallable(() -> nearbyController
|
||||
.loadAttractionsFromLocation(curLatLng, curLatLng, true,
|
||||
.loadAttractionsFromLocation(currentLatLng, currentLatLng, true,
|
||||
false)) // thanks to boolean, it will only return closest result
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
|
|
@ -571,9 +571,9 @@ public class ContributionsFragment
|
|||
if (closestNearbyPlace == null) {
|
||||
binding.cardViewNearby.setVisibility(View.GONE);
|
||||
} else {
|
||||
String distance = formatDistanceBetween(curLatLng, closestNearbyPlace.location);
|
||||
String distance = formatDistanceBetween(currentLatLng, closestNearbyPlace.location);
|
||||
closestNearbyPlace.setDistance(distance);
|
||||
direction = (float) computeBearing(curLatLng, closestNearbyPlace.location);
|
||||
direction = (float) computeBearing(currentLatLng, closestNearbyPlace.location);
|
||||
binding.cardViewNearby.updateContent(closestNearbyPlace);
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue