Skip to content

Conversation

@maskaravivek
Copy link
Contributor

Title (required)

Fixes #1601

@misaochan misaochan changed the base branch from master to 2.8-release August 6, 2018 07:59
@neslihanturan
Copy link
Collaborator

neslihanturan commented Aug 6, 2018

Only one line fix, it will be easier if you do. So I don't create another PR. Then wikidata uploads are linked.

  • Currently if you upload from map, wikidata uploads are successful.
  • But if you upload from list, it doesn't. Because a line was missing:
    In PlaceRenderer.java class, add this line just below line 130 "editor.putString(WIKIDATA_ENTITY_ID_PREF, place.getWikiDataEntityId());" then is will look like:
    private void storeSharedPrefs() { SharedPreferences.Editor editor = directPrefs.edit(); Timber.d("directPrefs stored"); editor.putString("Title", place.getName()); editor.putString("Desc", place.getLongDescription()); editor.putString("Category", place.getCategory()); editor.putString(WIKIDATA_ENTITY_ID_PREF, place.getWikiDataEntityId()); editor.apply(); }

This fix solved everything for me.

@maskaravivek
Copy link
Contributor Author

@neslihanturan Thanks for the tip. :)

I have added the line that you mentioned. @misaochan Can you help in testing this PR.

@codecov-io
Copy link

Codecov Report

Merging #1800 into 2.8-release will decrease coverage by <.01%.
The diff coverage is 0%.

Impacted file tree graph

@@              Coverage Diff               @@
##           2.8-release   #1800      +/-   ##
==============================================
- Coverage         3.66%   3.65%   -0.01%     
==============================================
  Files              188     188              
  Lines             9478    9483       +5     
  Branches           839     839              
==============================================
  Hits               347     347              
- Misses            9107    9112       +5     
  Partials            24      24
Impacted Files Coverage Δ
...fr/free/nrw/commons/nearby/NearbyListFragment.java 0% <0%> (ø) ⬆️
...a/fr/free/nrw/commons/upload/UploadController.java 0% <0%> (ø) ⬆️
.../fr/free/nrw/commons/nearby/NearbyMapFragment.java 0% <0%> (ø) ⬆️
...java/fr/free/nrw/commons/nearby/PlaceRenderer.java 0% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 143ad00...4abb4cc. Read the comment docs.

@nicolas-raoul
Copy link
Member

Tested with one image, it works :-)

@nicolas-raoul
Copy link
Member

nicolas-raoul commented Aug 7, 2018

I can confirm that uploads from Nearby (both map and list) are both working.

@misaochan
Copy link
Member

I have successfully added https://www.wikidata.org/wiki/Q19871703 via Nearby Map, and https://www.wikidata.org/wiki/Q2137835 via Nearby List. :)

Great job @maskaravivek and @neslihanturan !

@misaochan misaochan changed the title [WIP]Wikidata edit fix Wikidata edit fix Aug 7, 2018
@misaochan misaochan merged commit b5e90be into commons-app:2.8-release Aug 7, 2018
misaochan pushed a commit to misaochan/apps-android-commons that referenced this pull request Aug 8, 2018
@maskaravivek maskaravivek deleted the wikidataEditFix branch September 12, 2018 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants