Skip to content
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

Fixes #5725 allowing multiple language changes #5883

Merged
merged 2 commits into from
Oct 22, 2024

Conversation

cambo14
Copy link
Contributor

@cambo14 cambo14 commented Oct 22, 2024

When selecting multiple languages while uploading media, selecting a new language can result in the old language still showing as selected and not being able to be selected again.

Fixes #5725

What changes did you make and why?

UploadMediaDetailAdaptor.java:

  • Made it the HashMap storing the currently selected language is cleared when a new language is selected both in full list of languages and the recent languages list by modifying the OnClick listeners for both.

Tests performed (required)

Tested ProdDebug on Samsung S23 SM-S911B with API level 34 by selecting many various languages from both the full language list and recent language lists, as shown in the screenshots section below

Screenshots (for UI changes only)

Screen_Recording_20241022_154801_Commons.3.mp4

>> Made it so that selecting a language results in the hashmap storing the currently selected language(s) being cleared. Considered refactoring the hashmap storing this into a single pair storing the language positition index and its code, as only one language should ever be selected, however I am not confident that this would not introduce unintended side-effects
@misaochan
Copy link
Member

Thanks @cambo14 !

@misaochan misaochan merged commit f1205c1 into commons-app:main Oct 22, 2024
@cambo14 cambo14 deleted the allowMultipleLanguageChanges branch October 24, 2024 03:03
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.

[Bug]: Unable to change Caption/Description language multiple times
2 participants