Skip to content

Commit e5db54d

Browse files
LocationPickerActivity.java: replace code with a method call
Before this change, there was several lines of code which moved the map center to the EXIF location. After this change, the several lines of code have been replaced with a simpler method call which produces the same result.
1 parent cc4e64d commit e5db54d

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

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

+2-7
Original file line numberDiff line numberDiff line change
@@ -358,12 +358,7 @@ private void onClickModifyLocation() {
358358
smallToolbarText.setText(getResources().getString(R.string.pan_and_zoom_to_adjust));
359359
fabCenterOnLocation.setVisibility(View.VISIBLE);
360360
removeSelectedLocationMarker();
361-
if (cameraPosition != null && mapView != null) {
362-
if (mapView.getController() != null) {
363-
mapView.getController().animateTo(new GeoPoint(cameraPosition.getLatitude(),
364-
cameraPosition.getLongitude()));
365-
}
366-
}
361+
moveMapToMediaLocation();
367362
}
368363

369364
/**
@@ -401,7 +396,7 @@ private void removeLocationFromImage() {
401396
*/
402397
private void showInMapApp() {
403398
fr.free.nrw.commons.location.LatLng position = null;
404-
399+
405400
if(activity.equals("UploadActivity") && cameraPosition != null){
406401
//EXIF location data is available
407402
position = new fr.free.nrw.commons.location.LatLng(cameraPosition.getLatitude(),

0 commit comments

Comments
 (0)