Avatar still shown in "voted" pane after vote removed

I had a vote on a topic, but later removed it; the number of votes is reflected correctly. However, the details of who voted still includes me:

…and thus shows thirteen people.

I’m not sure if this affects just the currently-logged in user, or all users who’ve removed their votes.

It looks as though the query to determine who voted happens here, but when I run that query directly using Data Explorer, my name isn’t included. I’ve also validated that the post in question has no votes or votes_archive records in user_custom_fields for my user, so I suspect this is a JS display issue.

I think this is because this.scheduleRerender() isn’t being called after the removeVote() ajax request returns. I’ve opened a PR to resolve this; in this PR, I’ve also moved this.scheduleRerender() so that it’s always called at the end of the addVote() ajax promise resolution.

https://github.com/discourse/discourse-voting/pull/26

3 Likes

Solved as per the PR above.