apps-android-wikipedia
apps-android-wikipedia copied to clipboard
Prevent possible crash when showing results for other languages
What does this do?
Fix a possible crash when showing results for other languages in the SearchResultsFragment
Why is this needed?
We get the language code by providing a position to the language list, which may cause a crash.
val langCode = WikipediaApp.instance.languageState.appLanguageCodes[position]
This PR changes the plain list to a Pair<> that contains the language code with its result counts.
The error log in console
https://play.google.com/console/u/1/developers/6169333749249604352/app/4976363884102945010/vitals/crashes/0e0fb84f88cb64408c0412acfb8550ff/details?days=28&versionCode=50501&isUserPerceived=true