From 1d2398b30bd012ba6043709a74f40bf34bf90fde Mon Sep 17 00:00:00 2001 From: Jason Whitmore Date: Fri, 13 Sep 2024 16:02:51 -0700 Subject: [PATCH] LocationPickerActivity.java: fix map centering bug when editing location on already uploaded media Before this commit, when the user pressed the edit location icon on media which was already uploaded, the map would center on the device's current GPS location. After this commit, pressing the same edit location icon will now center the map on the location metadata. This is done by checking the activity string to see if the media is already uploaded. If so, a method is called to center the map on the media's location metadata. --- .../free/nrw/commons/LocationPicker/LocationPickerActivity.java | 2 +- 1 file changed, 1 insertion(+), 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 5966e2279..22659e77c 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 @@ -319,7 +319,7 @@ public class LocationPickerActivity extends BaseActivity implements requestLocationPermissions(); //If EXIF data is available, move map to EXIF location. - if(activity.equals("UploadActivity")){ + if(activity.equals("UploadActivity") || activity.equals("MediaActivity")){ moveMapToMediaLocation(); } else { //EXIF data is not available. Move map to device GPS location.