Add emoji reaction deletion api
This commit is contained in:
parent
5f7da7bff1
commit
15bc0df759
14 changed files with 142 additions and 45 deletions
|
@ -63,6 +63,7 @@ class ActionBar extends React.PureComponent {
|
|||
onReply: PropTypes.func.isRequired,
|
||||
onReblog: PropTypes.func.isRequired,
|
||||
onFavourite: PropTypes.func.isRequired,
|
||||
onEmojiReact: PropTypes.func.isRequired,
|
||||
onBookmark: PropTypes.func.isRequired,
|
||||
onDelete: PropTypes.func.isRequired,
|
||||
onEdit: PropTypes.func.isRequired,
|
||||
|
@ -182,13 +183,7 @@ class ActionBar extends React.PureComponent {
|
|||
};
|
||||
|
||||
handleEmojiPick = (data) => {
|
||||
/*
|
||||
const { text } = this.props;
|
||||
const position = this.autosuggestTextarea.textarea.selectionStart;
|
||||
const needsSpace = data.custom && position > 0 && !allowedAroundShortCode.includes(text[position - 1]);
|
||||
|
||||
this.props.onPickEmoji(position, data, needsSpace);
|
||||
*/
|
||||
this.props.onEmojiReact(this.props.status, data);
|
||||
};
|
||||
|
||||
render () {
|
||||
|
|
|
@ -191,7 +191,7 @@ class DetailedStatus extends ImmutablePureComponent {
|
|||
let emojiReactionsBar = null;
|
||||
if (status.get('emoji_reactions')) {
|
||||
const emojiReactions = status.get('emoji_reactions');
|
||||
emojiReactionsBar = <StatusEmojiReactionsBar emojiReactions={emojiReactions} statusId={status.get('id')} />;
|
||||
emojiReactionsBar = <StatusEmojiReactionsBar emojiReactions={emojiReactions} status={status} onEmojiReaction={this.props.onEmojiReaction} OnUnEmojiReaction={this.props.OnUnEmojiReaction} />;
|
||||
}
|
||||
|
||||
if (status.get('application')) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue