achievements: make sure thanks count is displayed properly

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 11:28:49 +05:30
parent 7e5789d539
commit 7689e24977

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) {