Skip to content

Conversation

@Jason-Whitmore
Copy link
Collaborator

Description (required)

Fixes #6534

What changes did you make and why?

The only change was a single line of code added: When data is being retrieved from the local Place repository, the Place object which is used by the Nearby activity is now correctly assigned the local Place's Sitelink object.

Sitelinks will now appear in the user interface.

Tests performed (required)

This bug seems to only appear when retrieving Place data from the local Place repository (not from Wikidata queries). To test, use Places which are known to be stored locally.

On main, the Sitelinks will not appear in the user interface. On this PR, the Sitelinks will appear (see screenshot below).

Tested ProdDebug on Android Studio emulator with API level 36.

Screenshots (for UI changes only)

image

…Sitelinks from local data

Before this change, when information about a Place was retrieved from the local Place
repository, the Sitelink object was not set into the new Place object. This would
cause the Sitelink icons to be missing from the user interface for some Places.

This change now sets the Sitelinks object to the locally retrieved Place's Sitelinks.
These sitelinks now appear in the user interface if they are stored locally.
@Jason-Whitmore
Copy link
Collaborator Author

Also, when I was fixing this issue I noticed that the method NearbyFragmentPresenter.loadPlacesDataAsync() is quite long (140+ lines of code) and complex. Fortunately, it appears the method can be easily refactored. Should refactoring be done in this PR or a different PR?

@nicolas-raoul
Copy link
Member

How about a different PR, unless not refactoring makes your work much more difficult? Thanks a lot! 🙂

@github-actions
Copy link

✅ Generated APK variants!

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.

Wikipedia link when selecting Nearby pin that has an article

2 participants