Skip to content

Fixes Issue #6241: Explore>Map images show "Unknown" #6260

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

Merged
merged 1 commit into from
Mar 31, 2025

Conversation

Jason-Whitmore
Copy link
Contributor

Description (required)

Fixes #6241

What changes did you make and why?

I created a private helper method to locate the specific Media object from the mediaList field using the image URL retrieved from the BaseMarker object.

I also added code so that once the correct Media object is found, the author/username is retrieved and any HTML is removed from it. This String is then placed in the label constructor. When the marker is tapped, the author/username is now displayed in the label (see image).

Tests performed (required)

Tested ProdDebug on Android Studio emulator with API level 34.

Screenshots (for UI changes only)

image

… display the username

Before this change, the labels that would appear on the marker when tapped did not include
the author or username. Instead, it displayed "Unknown".

After this change, the labels now display the author name. If the author name is not
available, the username will be displayed. If both are unavailable, the default value
of "Unknown" will be displayed. To improve the readability of the text, any HTML text
is removed from the username/author.
Copy link

✅ Generated APK variants!

Copy link
Member

@nicolas-raoul nicolas-raoul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works great, thanks!

@nicolas-raoul nicolas-raoul merged commit 6e090c8 into commons-app:main Mar 31, 2025
1 check passed
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.

Explore>Map images show "Unknown"
2 participants