Skip to content

Fix: prevent showing NearbyCard when seeing our contributions from Profile screen #6339

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

Conversation

rohit9625
Copy link
Collaborator

Description (required)

Fixes #6332

What changes did you make and why?
We shouldn't show NearbyCard when seeing our Contributions from ProfileActivity

To fix this we can either:

  • Pass the userName property like this: putString(KEY_USERNAME, [email protected])
  • Or make the userName property private in ContributionsFragment as it's being used there only

So, I make that property private because it also promotes encapsulation :)

Tests performed (required)

Tested prodDebug on Samsung A14 5G with API level 34.

Screenshots (for UI changes only)

Note that NearbyCardView correctly shows on the main Contributions screen but not on the Profile screen

After_Fix.mp4

Copy link

✅ Generated APK variants!

@rohit9625
Copy link
Collaborator Author

The CI is passing now, it seems like the TranslateWiki issue is resolved @nicolas-raoul

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.

Working great, thanks!

@nicolas-raoul nicolas-raoul merged commit 5665bc7 into commons-app:main Jun 17, 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.

Java.lang.ClassCastException: ProfileActivity -> MainActivity cast
2 participants