1
0
Fork 0
forked from gitea/nas

Add api for set emoji reactions to toot

This commit is contained in:
KMY 2023-02-24 20:57:01 +09:00
parent f157a509d6
commit 5f7da7bff1
17 changed files with 276 additions and 18 deletions

View file

@ -68,6 +68,7 @@ class StatusActionBar extends ImmutablePureComponent {
relationship: ImmutablePropTypes.map,
onReply: PropTypes.func,
onFavourite: PropTypes.func,
onEmojiReact: PropTypes.func,
onReblog: PropTypes.func,
onDelete: PropTypes.func,
onDirect: PropTypes.func,
@ -129,6 +130,16 @@ class StatusActionBar extends ImmutablePureComponent {
}
};
handleEmojiPick = (data) => {
const { signedIn } = this.context.identity;
if (signedIn) {
this.props.onEmojiReact(this.props.status, data);
} else {
this.props.onInteractionModal('favourite', this.props.status);
}
};
handleReblogClick = e => {
const { signedIn } = this.context.identity;
@ -232,16 +243,6 @@ class StatusActionBar extends ImmutablePureComponent {
this.props.onFilter();
};
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);
*/
};
render () {
const { status, relationship, intl, withDismiss, withCounters, scrollKey } = this.props;
const { signedIn, permissions } = this.context.identity;