Click to open EmojiSelector on mobile (DetailedStatus)
This commit is contained in:
parent
8b505c0488
commit
4af3c453e6
1 changed files with 11 additions and 2 deletions
|
@ -123,7 +123,16 @@ class ActionBar extends React.PureComponent {
|
|||
}
|
||||
|
||||
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 => {
|
||||
|
@ -134,6 +143,7 @@ class ActionBar extends React.PureComponent {
|
|||
} else {
|
||||
this.props.onOpenUnauthorizedModal();
|
||||
}
|
||||
this.setState({ emojiSelectorVisible: false });
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -305,7 +315,6 @@ class ActionBar extends React.PureComponent {
|
|||
title={intl.formatMessage(messages.favourite)}
|
||||
icon='thumbs-up'
|
||||
emoji={meEmojiReact}
|
||||
// onClick={this.handleReactClick(meEmojiReact || '👍')}
|
||||
text='Like'
|
||||
/>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue