Click to open EmojiSelector on mobile (DetailedStatus)

merge-requests/18/head
Alex Gleason 4 years ago
parent 8b505c0488
commit 4af3c453e6
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7

@ -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…
Cancel
Save