Skip to content

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

Merged
nicolas-raoul merged 1 commit intocommons-app:mainfrom
Jason-Whitmore:issue_6241
Mar 31, 2025
Merged

Fixes Issue #6241: Explore>Map images show "Unknown"#6260
nicolas-raoul merged 1 commit intocommons-app:mainfrom
Jason-Whitmore:issue_6241

Conversation

@Jason-Whitmore
Copy link
Collaborator

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.
@github-actions
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
sonalyadav1 pushed a commit to sonalyadav1/apps-android-commons that referenced this pull request May 22, 2025
… display the username (commons-app#6260)

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.
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