achievements: make sure thanks count is displayed properly (#5647)

We seem to be incorrectly setting the the thanks count in the achievement level
text. This was then being over-written by the actual achievement level value
in the code flow. In the end, the thanks count seems not to have been displayed at all.

Correct this by properly updating the thanks count.

Fixes #5641
This commit is contained in:
Kaartic Sivaraam 2024-03-25 16:00:04 +05:30 committed by GitHub
parent 2a2780a4d2
commit 01a3e14154
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -354,7 +354,7 @@ public class AchievementsFragment extends CommonsDaggerSupportFragment {
*/ */
private void inflateAchievements(Achievements achievements) { private void inflateAchievements(Achievements achievements) {
binding.imagesUsedByWikiProgressBar.setVisibility(View.VISIBLE); binding.imagesUsedByWikiProgressBar.setVisibility(View.VISIBLE);
binding.achievementLevel.setText(String.valueOf(achievements.getThanksReceived())); binding.thanksReceived.setText(String.valueOf(achievements.getThanksReceived()));
binding.imagesUsedByWikiProgressBar.setProgress binding.imagesUsedByWikiProgressBar.setProgress
(100 * achievements.getUniqueUsedImages() / levelInfo.getMaxUniqueImages()); (100 * achievements.getUniqueUsedImages() / levelInfo.getMaxUniqueImages());
if(binding.tvWikiPb != null) { if(binding.tvWikiPb != null) {