Closed nicolas-raoul closed 5 years ago
@nicolas-raoul I also reproduced this issue. I quickly skipped relative code and think may be I can fix this issue. Please assign it to me :-)
It is yours! :-)
To investigate, feel free to use this sandbox item: https://www.wikidata.org/wiki/Q4115189 you can modify its coordinates if you want. You can also use a fake GPS app.
When a picture is uploaded via Nearby with wrong or no coordinates, the app must show a popup telling:
This picture's location does not match the nearby place's location. Are you sure this picture represents that place?
And if the user choose to continue, the picture should be uploaded and linked from WIkidata.
Coordinates often do not match, for instance when uploading picture that has no GPS coordinates, or when uploading a picture of a mountain, taken from reasonably far away.
Right now the problem is that it only says Image location and nearby place location mismatched, so Wikidata item won't be edited
in the log and does not link from WIkidata.
@zhao-gang If I understand your pull request correctly, it disregards and overwrites Picture_Has_Correct_Location
? Would you mind modifying your pull request to:
Thanks!
I actually chose to merge and create a different issue: #2578 @zhao-gang feel free to take it if you are interested in it :-)
@nicolas-raoul AFAIK, the mismatched location check is in the default case, see: https://github.com/commons-app/apps-android-commons/blob/52724b8be0fb8236a742af42a8cc8ceda171abb7/app/src/main/java/fr/free/nrw/commons/upload/UploadPresenter.java#L167-L172
So if the image location is not matched to nearby location, there will be a pop up:
I set the flag if imageResult is IMAGE_KEEP(which means the user select continue in popup window) or IMAGE_OK(which means the image is OK). I think that's the reasonable place to set this flag. Please correct me if I'm wrong :-) https://github.com/commons-app/apps-android-commons/blob/52724b8be0fb8236a742af42a8cc8ceda171abb7/app/src/main/java/fr/free/nrw/commons/upload/UploadPresenter.java#L129-L132
Oh, so it seems I misunderstood, sorry! I will test :-)
I only tried once:
System logs:
Device and Android version:
LineageOS 7.1.2
Commons app version:
2.10.1.241~64eae8b