on trying to upvote again previous vote gets cancelled!
when i try to upvote a post that i have upvoted previously the previous vote gets cancelled and score gets reduced.
same problem occurs when i try to downvote a post that i have previously downvoted. Is this the desired behavior?
Comments
Maybe it's not the best way, how would you suggest to handle this situation?
desired behavior should be that previous vote shall only be cancelled if my current vote and old vote are opposites otherwise it shouldn't.
to tackle this situation i had to override the process_vote method and added a check before vote.cancel() as mentioned below in my answer.
Not sure if it's a big deal, this is the first time someone identified this as a problem in more than two years.
What if you wanted to cancel your upvote without downvoting (or vice versa)?