Skip to content

Commit bdf3d17

Browse files
LocationPickerActivity.java: remove redundant code
Before this change, there was two sections of code which moved the map center to the same location. Both of these code sections occur very close to each other (one in onCreate(), the other in setupMapView()) After this change, the code section in onCreate() has been removed. With the map centering code only in the setupMapView() method. This change eliminates redundancy, reduces the amount of code in onCreate(), and makes this java file easier to understand.
1 parent e5db54d commit bdf3d17

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

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

-10
Original file line numberDiff line numberDiff line change
@@ -238,16 +238,6 @@ protected void onCreate(@Nullable final Bundle savedInstanceState) {
238238
cameraPosition.getLongitude()));
239239
}
240240
setupMapView();
241-
242-
if("UploadActivity".equals(activity)){
243-
if(mapView != null && mapView.getController() != null && cameraPosition != null){
244-
GeoPoint cameraGeoPoint = new GeoPoint(cameraPosition.getLatitude(),
245-
cameraPosition.getLongitude());
246-
247-
mapView.getController().setCenter(cameraGeoPoint);
248-
mapView.getController().animateTo(cameraGeoPoint);
249-
}
250-
}
251241
}
252242

253243
/**

0 commit comments

Comments
 (0)