Skip to content

Nearby: Map moves by itself after scrolling if a list item has previously been clicked. #6046

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

Closed
savsch opened this issue Dec 19, 2024 · 2 comments · Fixed by #6061
Closed
Assignees
Labels

Comments

@savsch
Copy link
Contributor

savsch commented Dec 19, 2024

Summary

In nearby, upon clicking an item in the list (which can be opened using the list icon at the top right), the map moves itself so that the item is centered on the map, which is intended.

After this, whenever the user moves the map to another location, then, once the pins load, the map moves by itself, to center itself to a random pin. This keeps on happening every time new pins (or pin details) are loaded, until the app is restarted.

Steps to reproduce

  1. Open the app, go to the nearby section.
  2. Click on the list button on the top right.
  3. Click on one of the places displayed in the list. The map moves itself to center the place as intended.
  4. In the map, move to a new place. Wait for the pins to load. When (and while) they load, the map moves by itself.

Expected behaviour

The map doesn't move at random without user interaction.

Actual behaviour

The map moves by itself.

Device name

Samsung Galaxy S20 FE

Android version

Android 13

Commons app version

5.1.0 F-Droid release, and also the current main branch

Device logs

No response

Screen-shots

No response

Would you like to work on the issue?

Yes

@savsch savsch added the bug label Dec 19, 2024
@nicolas-raoul
Copy link
Member

I cannot reproduce on 5.0.2-debug-nearby/performance-experiments~bacc4b367 am I doing it wrong or is it fixed already? 🙂

screen-20241220-101729.mp4

@savsch
Copy link
Contributor Author

savsch commented Dec 20, 2024

am I doing it wrong or is it fixed already? 🙂

It has not been fixed. I believe it is more likely to occur when the clicked item is at/near the top of the list.

Screen_Recording_20241220_115600_Commons.mp4

savsch added a commit to savsch/apps-android-commons that referenced this issue Dec 21, 2024
fixes commons-app#6046

the OnFocusChangeListener for nearby place list items sometimes gets invoked when new items aer set, even when the list is hidden, if an item had previously been clicked in it. This in turn causes the onItemClick to be called. This commit adds a check to make sure the list is not hidden when onItemClick is invoked this way.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants