# Avatar still shown in "voted" pane after vote removed

**URL:** <https://meta.discourse.org/t/avatar-still-shown-in-voted-pane-after-vote-removed/66480>\
**Category:** Bug\
**Tags:** topic-voting\
**Created:** [2017年七月20日 02:13 UTC](https://meta.discourse.org/t/avatar-still-shown-in-voted-pane-after-vote-removed/66480 "2017-07-20T02:13:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![barryvan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/barryvan/32/82635_2.png) [@barryvan](https://meta.discourse.org/u/barryvan)\
**Post date:** [2017年七月20日 02:13 UTC](https://meta.discourse.org/t/avatar-still-shown-in-voted-pane-after-vote-removed/66480/1 "2017-07-20T02:13:26Z")

</div>

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:

 ![](https://global.discourse-cdn.com/meta/original/3X/c/a/ca9f713406c0dfcf2b9c35a3057e08843c4febdc.png)

…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](https://github.com/discourse/discourse-voting/blob/master/app/controllers/discourse_voting/votes_controller.rb#L71), but when I run that query directly using [Data Explorer](https://meta.discourse.org/t/32566?silent=true), 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.

---

<div class="post-metadata">

**Author:** ![barryvan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/barryvan/32/82635_2.png) [@barryvan](https://meta.discourse.org/u/barryvan)\
**Post date:** [2017年七月20日 02:22 UTC](https://meta.discourse.org/t/avatar-still-shown-in-voted-pane-after-vote-removed/66480/2 "2017-07-20T02:22:41Z")

</div>

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](https://github.com/discourse/discourse-voting/pull/26)

---

<div class="post-metadata">

**Author:** ![erlend\_sh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/erlend_sh/32/119475_2.png) [@erlend\_sh](https://meta.discourse.org/u/erlend_sh)\
**Post date:** [2018年八月20日 12:24 UTC](https://meta.discourse.org/t/avatar-still-shown-in-voted-pane-after-vote-removed/66480/3 "2018-08-20T12:24:12Z")

</div>

Solved as per the PR above.
