Closed CHOOSEIT closed 5 months ago
Thank you, @yoannLafore, for your review 🎉
As this PR changes a lot of things, we are going to wait for a second reviewer before merging 💯 (@JoachimFavre)
I just have another general comment. I feel like you no longer a
DynamicUserAvatar
and aUserAvatar
, we can get rid ofDyanmicUserAvatar
, can't we?
You are completely right ! I answered in this comment: https://github.com/ProximaEPFL/proxima/pull/348#discussion_r1615254059
As I changed a big chunk since the approval of @yoannLafore, I think he should take a look at the new code.
Fixes: #342
This PR aims to fix the user avatar not updating properly on challenge completion.
As you can see with the line changes, this was not a straight-forward bug fix. We had not any updates on the user avatars. The user avatars were also not linked to any provider, hence, on challenge completion, we had no way to update every user avatar at once.
This PR creates a new provider
userCentauriPointsViewModelProvider
, that gets the centauri points of a user given its user id. This provider is refreshable, allowing us to watch on it in every user avatar.Note that the user avatar had not access to the user id of the displayed user, so a considerable part of this PR is giving this access to this information.