LocationPickerActivity.java: rearrange method calls.

Before this change, a method call to move the map to the device's GPS location was called at the very end of the map setup method.
This would move the map away from the media's EXIF location data (if it was available).

This change places the method call to move the map to the device's GPS location before the method call to move the map to the media's EXIF location (if the data is available).
In short, if no exif data is available, the map attempts to move to the device's GPS location. If the exif location data does exist, the map will move to that location.
This commit is contained in:
Jason Whitmore 2024-06-04 16:35:51 -07:00
parent d1c849af36
commit a8bdbbc62d

View file

@ -327,12 +327,12 @@ public class LocationPickerActivity extends BaseActivity implements
} }
private void setupMapView() { private void setupMapView() {
requestLocationPermissions();
moveMapToMediaLocation(); moveMapToMediaLocation();
modifyLocationButton.setOnClickListener(v -> onClickModifyLocation()); modifyLocationButton.setOnClickListener(v -> onClickModifyLocation());
removeLocationButton.setOnClickListener(v -> onClickRemoveLocation()); removeLocationButton.setOnClickListener(v -> onClickRemoveLocation());
showInMapButton.setOnClickListener(v -> showInMap()); showInMapButton.setOnClickListener(v -> showInMap());
darkThemeSetup(); darkThemeSetup();
requestLocationPermissions();
} }
/** /**