From e55f4916ee7e4c95326f0b86f37c2c52b09b40be Mon Sep 17 00:00:00 2001 From: Jason Whitmore Date: Sat, 6 Jul 2024 16:34:31 -0700 Subject: [PATCH] LocationPickerActivity.java: rewrite comments to clarify if statement Before this change, a comment in showInMapApp did not properly describe an if statement's intended behavior. After this change, the old comment was removed and 2 new comments were added in each part of the if statement to properly describe the intended behavior. --- .../nrw/commons/LocationPicker/LocationPickerActivity.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/fr/free/nrw/commons/LocationPicker/LocationPickerActivity.java b/app/src/main/java/fr/free/nrw/commons/LocationPicker/LocationPickerActivity.java index 81cf73ac3..7f316250c 100644 --- a/app/src/main/java/fr/free/nrw/commons/LocationPicker/LocationPickerActivity.java +++ b/app/src/main/java/fr/free/nrw/commons/LocationPicker/LocationPickerActivity.java @@ -402,11 +402,12 @@ public class LocationPickerActivity extends BaseActivity implements private void showInMapApp() { fr.free.nrw.commons.location.LatLng position = null; - //Check to see if EXIF location data is available if(activity.equals("UploadActivity") && cameraPosition != null){ + //EXIF location data is available position = new fr.free.nrw.commons.location.LatLng(cameraPosition.getLatitude(), cameraPosition.getLongitude(), 0.0f); } else if(mapView != null){ + //EXIF location data is not available position = new fr.free.nrw.commons.location.LatLng(mapView.getMapCenter().getLatitude(), mapView.getMapCenter().getLongitude(), 0.0f); }