Skip to content

Commit cc4e64d

Browse files
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.
1 parent be87338 commit cc4e64d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/src/main/java/fr/free/nrw/commons/LocationPicker/LocationPickerActivity.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -402,11 +402,12 @@ private void removeLocationFromImage() {
402402
private void showInMapApp() {
403403
fr.free.nrw.commons.location.LatLng position = null;
404404

405-
//Check to see if EXIF location data is available
406405
if(activity.equals("UploadActivity") && cameraPosition != null){
406+
//EXIF location data is available
407407
position = new fr.free.nrw.commons.location.LatLng(cameraPosition.getLatitude(),
408408
cameraPosition.getLongitude(), 0.0f);
409409
} else if(mapView != null){
410+
//EXIF location data is not available
410411
position = new fr.free.nrw.commons.location.LatLng(mapView.getMapCenter().getLatitude(),
411412
mapView.getMapCenter().getLongitude(), 0.0f);
412413
}

0 commit comments

Comments
 (0)