Click to open EmojiSelector on mobile (DetailedStatus)
This commit is contained in:
parent
8b505c0488
commit
4af3c453e6
|
@ -123,7 +123,16 @@ class ActionBar extends React.PureComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
handleLikeButtonClick = e => {
|
handleLikeButtonClick = e => {
|
||||||
if (this.isMobile()) this.setState({ emojiSelectorVisible: true });
|
const meEmojiReact = getReactForStatus(this.props.status) || '👍';
|
||||||
|
if (this.isMobile()) {
|
||||||
|
if (this.state.emojiSelectorVisible) {
|
||||||
|
this.handleReactClick(meEmojiReact)();
|
||||||
|
} else {
|
||||||
|
this.setState({ emojiSelectorVisible: true });
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.handleReactClick(meEmojiReact)();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
handleReactClick = emoji => {
|
handleReactClick = emoji => {
|
||||||
|
@ -134,6 +143,7 @@ class ActionBar extends React.PureComponent {
|
||||||
} else {
|
} else {
|
||||||
this.props.onOpenUnauthorizedModal();
|
this.props.onOpenUnauthorizedModal();
|
||||||
}
|
}
|
||||||
|
this.setState({ emojiSelectorVisible: false });
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -305,7 +315,6 @@ class ActionBar extends React.PureComponent {
|
||||||
title={intl.formatMessage(messages.favourite)}
|
title={intl.formatMessage(messages.favourite)}
|
||||||
icon='thumbs-up'
|
icon='thumbs-up'
|
||||||
emoji={meEmojiReact}
|
emoji={meEmojiReact}
|
||||||
// onClick={this.handleReactClick(meEmojiReact || '👍')}
|
|
||||||
text='Like'
|
text='Like'
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue