also disable reaction buttons in vanilla flavour
This commit is contained in:
parent
804bf4aa38
commit
2a64c4d028
3 changed files with 9 additions and 6 deletions
|
@ -370,7 +370,7 @@ class StatusActionBar extends ImmutablePureComponent {
|
||||||
<IconButton className='status__action-bar__button' title={intl.formatMessage(messages.hide)} icon='eye' onClick={this.handleHideClick} />
|
<IconButton className='status__action-bar__button' title={intl.formatMessage(messages.hide)} icon='eye' onClick={this.handleHideClick} />
|
||||||
);
|
);
|
||||||
|
|
||||||
const canReact = status.get('reactions').filter(r => r.get('count') > 0 && r.get('me')).size < maxReactions;
|
const canReact = signedIn && status.get('reactions').filter(r => r.get('count') > 0 && r.get('me')).size < maxReactions;
|
||||||
const reactButton = (
|
const reactButton = (
|
||||||
<IconButton
|
<IconButton
|
||||||
className='status__action-bar-button'
|
className='status__action-bar-button'
|
||||||
|
|
|
@ -85,11 +85,14 @@ class Reaction extends ImmutablePureComponent {
|
||||||
|
|
||||||
handleClick = () => {
|
handleClick = () => {
|
||||||
const { reaction, statusId, addReaction, removeReaction } = this.props;
|
const { reaction, statusId, addReaction, removeReaction } = this.props;
|
||||||
|
const { signedIn } = this.context.identity;
|
||||||
|
|
||||||
if (reaction.get('me')) {
|
if (signedIn) {
|
||||||
removeReaction(statusId, reaction.get('name'));
|
if (reaction.get('me')) {
|
||||||
} else {
|
removeReaction(statusId, reaction.get('name'));
|
||||||
addReaction(statusId, reaction.get('name'));
|
} else {
|
||||||
|
addReaction(statusId, reaction.get('name'));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -268,7 +268,7 @@ class ActionBar extends React.PureComponent {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const canReact = status.get('reactions').filter(r => r.get('count') > 0 && r.get('me')).size < maxReactions;
|
const canReact = signedIn && status.get('reactions').filter(r => r.get('count') > 0 && r.get('me')).size < maxReactions;
|
||||||
const reactButton = (
|
const reactButton = (
|
||||||
<IconButton
|
<IconButton
|
||||||
className='plus-icon'
|
className='plus-icon'
|
||||||
|
|
Loading…
Reference in a new issue