|
|
|
@ -85,11 +85,14 @@ class Reaction extends ImmutablePureComponent {
|
|
|
|
|
|
|
|
|
|
handleClick = () => {
|
|
|
|
|
const { reaction, statusId, addReaction, removeReaction } = this.props;
|
|
|
|
|
|
|
|
|
|
if (reaction.get('me')) {
|
|
|
|
|
removeReaction(statusId, reaction.get('name'));
|
|
|
|
|
} else {
|
|
|
|
|
addReaction(statusId, reaction.get('name'));
|
|
|
|
|
const { signedIn } = this.context.identity;
|
|
|
|
|
|
|
|
|
|
if (signedIn) {
|
|
|
|
|
if (reaction.get('me')) {
|
|
|
|
|
removeReaction(statusId, reaction.get('name'));
|
|
|
|
|
} else {
|
|
|
|
|
addReaction(statusId, reaction.get('name'));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|