mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-11-01 07:13:56 +01:00
Consistent handling of web and geo urls (#2750)
* Consistent handling of web and geo urls * Remove Google map intent
This commit is contained in:
parent
7c77530c2e
commit
2021baa080
11 changed files with 59 additions and 105 deletions
|
|
@ -57,6 +57,7 @@ import fr.free.nrw.commons.contributions.Contribution;
|
|||
import fr.free.nrw.commons.contributions.ContributionController;
|
||||
import fr.free.nrw.commons.filepicker.UploadableFile;
|
||||
import fr.free.nrw.commons.kvstore.JsonKvStore;
|
||||
import fr.free.nrw.commons.location.LatLng;
|
||||
import fr.free.nrw.commons.mwapi.MediaWikiApi;
|
||||
import fr.free.nrw.commons.nearby.Place;
|
||||
import fr.free.nrw.commons.theme.BaseActivity;
|
||||
|
|
@ -415,7 +416,7 @@ public class UploadActivity extends BaseActivity implements UploadView, SimilarI
|
|||
}
|
||||
|
||||
@Override
|
||||
public void launchMapActivity(String decCoords) {
|
||||
public void launchMapActivity(LatLng decCoords) {
|
||||
Utils.handleGeoCoordinates(this, decCoords);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import fr.free.nrw.commons.category.CategoriesModel;
|
|||
import fr.free.nrw.commons.contributions.Contribution;
|
||||
import fr.free.nrw.commons.filepicker.UploadableFile;
|
||||
import fr.free.nrw.commons.kvstore.JsonKvStore;
|
||||
import fr.free.nrw.commons.location.LatLng;
|
||||
import fr.free.nrw.commons.nearby.Place;
|
||||
import fr.free.nrw.commons.settings.Prefs;
|
||||
import fr.free.nrw.commons.utils.CustomProxy;
|
||||
|
|
@ -225,7 +226,7 @@ public class UploadPresenter {
|
|||
void openCoordinateMap() {
|
||||
GPSExtractor gpsObj = uploadModel.getCurrentItem().getGpsCoords();
|
||||
if (gpsObj != null && gpsObj.imageCoordsExists) {
|
||||
view.launchMapActivity(gpsObj.getDecLatitude() + "," + gpsObj.getDecLongitude());
|
||||
view.launchMapActivity(new LatLng(gpsObj.getDecLatitude(), gpsObj.getDecLongitude(), 0.0f));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package fr.free.nrw.commons.upload;
|
|||
|
||||
import android.net.Uri;
|
||||
import androidx.annotation.IntDef;
|
||||
import fr.free.nrw.commons.location.LatLng;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
import java.util.List;
|
||||
|
|
@ -70,7 +71,7 @@ public interface UploadView {
|
|||
|
||||
void finish();
|
||||
|
||||
void launchMapActivity(String decCoords);
|
||||
void launchMapActivity(LatLng decCoords);
|
||||
|
||||
void showErrorMessage(int resourceId);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue