group-income
group-income copied to clipboard
Profile picture is not updated after setting it
Problem
While I was testing with GI_PERSIST=sqlite grunt dev
, I set a profile picture using the avatar uploader. You can see it says "Avatar updated!" but the profile picture is still the red blockies:
If I refresh the page, however, the updated profile picture appears on my user.
Likewise, for any other users in the group, the profile picture is not updated immediately. Other users have to refresh the page for the profile picture to appear.
EDIT: this seems to only happen sometimes! 😱
Solution
The profile picture should be immediately updated.
This issue is possibly related to #1840.
Actually, a page refresh isn't even needed. The Vuex data does get updated instantly. But the AvatarUser.vue
component doesn't get updated immediately. It does get updated if, for example, we close the modal, and re-open it. Or if we switch from the dashboard to some other page (like Contributions) and back to the Dashboard, the AvatarUser profile picture in the users list does get updated.
This happened here:
Notice the avatar in the lower-left is different from the one in the user list. This is because the page switched to the Contributions component and back to the dashboard, causing a redraw of the AvatarUser component in the user list, but not in the lower-left (because that wasn't redrawn).
It seems like a manual redraw / forceUpdate is needed on this component when the avatar changes.
@taoeffect, can you please upload the video to reproduce this error? I tried many times, but could not reproduce this one.
@Silver-IT I cannot reproduce it anymore either. And in the issue I mentioned that I can't reproduce it every time. So, I'm not sure, if you can't reproduce it, don't worry about it for now.