-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Made Nearby show all pins that could be presented on the screen, rather than a circle #5553
Conversation
@nicolas-raoul, Can you please review this PR 🙂 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works and I love it already!
Just a few nits to correct.
app/src/main/java/fr/free/nrw/commons/mwapi/OkHttpJsonApiClient.java
Outdated
Show resolved
Hide resolved
app/src/main/java/fr/free/nrw/commons/nearby/NearbyController.java
Outdated
Show resolved
Hide resolved
app/src/main/java/fr/free/nrw/commons/nearby/fragments/NearbyParentFragment.java
Outdated
Show resolved
Hide resolved
app/src/main/java/fr/free/nrw/commons/nearby/fragments/NearbyParentFragment.java
Outdated
Show resolved
Hide resolved
# Conflicts: # gradle.properties
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few more very minor things
app/src/main/java/fr/free/nrw/commons/nearby/NearbyController.java
Outdated
Show resolved
Hide resolved
return null; | ||
} | ||
|
||
List<Place> places = nearbyPlaces.getFromWikidataQuery(screenTopRight,screenBottomLeft,Locale.getDefault().getLanguage(),shouldQueryForMonuments, customQuery); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spaces, line length
@@ -328,6 +329,76 @@ public List<Place> getNearbyPlaces(final LatLng cur, final String language, fina | |||
throw new Exception(response.message()); | |||
} | |||
|
|||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we still need the methods above and below this one (with the radius
parameter)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's required during upload to prepopulate categories and depictions based on the image coordinates where their radius
is used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yes thanks! :-)
Does nearby_query.rq
still work with a radius though?
If not, maybe splitting the file into two files named for instance rectangle_query_for_nearby.rq
and radius_query_for_upload_wizard.rq
might be required?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure!
@nicolas-raoul, I have made the changes suggested by you 1e732ed. I completely forgot about the monuments since they are also using radius query we may need different files for them, Can you please share the names for |
How about rectangle_query_for_nearby_monuments.rq? |
I found out that everywhere for radius, shouldQueryForMonuments is set to false. So removing radius query for monuments will be okay :-) d7ce78e |
Hey @nicolas-raoul
Is failing of checks related to #5571 |
Sorry for the delay, would you mind fixing thee conflict? |
Hey @nicolas-raoul, I think all the conflicts are fixed now. Can you please look into it. |
Friendly ping @nicolas-raoul |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you mind performing the stylistic changes in a different pull request?
They make it very difficult to spot what actually changed.
Thanks! :-)
Hey @nicolas-raoul, Sorry to ask you a simple question but can you please give more information what kind of |
I must have dreamt, I don't see them anymore, sorry my bad! 😰 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Working well even for Manhattan, thanks!
Description (required)
Fixes #5480
What changes did you make and why?
Tests performed (required)
Tested prodDebug on Samsung S21 FE with API level 33.
Screenshots (for UI changes only)
WhatsApp.Video.2024-02-16.at.02.50.42_95e8f853.mp4