mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-18 10:52:16 +03:00
fixed issue with upvote downvote local cache swap not updating ui
This commit is contained in:
parent
5642819488
commit
06ea7e6bc4
@ -87,11 +87,8 @@ const UpvoteContainer = (props) => {
|
||||
incrementVoteCount();
|
||||
}
|
||||
|
||||
if (isDownvote) {
|
||||
setIsDownVoted(true);
|
||||
} else {
|
||||
setIsVoted(true);
|
||||
}
|
||||
setIsDownVoted(isDownvote ? true : false);
|
||||
setIsVoted(isDownvote ? false : true);
|
||||
}
|
||||
};
|
||||
|
||||
@ -105,11 +102,8 @@ const UpvoteContainer = (props) => {
|
||||
incrementVoteCount();
|
||||
}
|
||||
|
||||
if (isDownvote) {
|
||||
setIsDownVoted(true);
|
||||
} else {
|
||||
setIsVoted(true);
|
||||
}
|
||||
setIsDownVoted(isDownvote ? true : false);
|
||||
setIsVoted(isDownvote ? false : true);
|
||||
|
||||
setTotalPayout(totalPayout + amountNum);
|
||||
//update redux
|
||||
|
Loading…
Reference in New Issue
Block a user