Update emoji reaction patches
This commit is contained in:
parent
f214cd2938
commit
bcab2d89ca
4 changed files with 23 additions and 18 deletions
|
@ -123,7 +123,7 @@ class StatusActionBar extends ImmutablePureComponent {
|
||||||
|
|
||||||
handleEmojiPick = data => {
|
handleEmojiPick = data => {
|
||||||
this.props.onReactionAdd(this.props.status.get('id'), data.native.replace(/:/g, ''), data.imageUrl);
|
this.props.onReactionAdd(this.props.status.get('id'), data.native.replace(/:/g, ''), data.imageUrl);
|
||||||
}
|
};
|
||||||
|
|
||||||
handleReblogClick = e => {
|
handleReblogClick = e => {
|
||||||
const { signedIn } = this.context.identity;
|
const { signedIn } = this.context.identity;
|
||||||
|
@ -205,7 +205,7 @@ class StatusActionBar extends ImmutablePureComponent {
|
||||||
this.props.onAddFilter(this.props.status);
|
this.props.onAddFilter(this.props.status);
|
||||||
};
|
};
|
||||||
|
|
||||||
handleNoOp = () => {} // hack for reaction add button
|
handleNoOp = () => {}; // hack for reaction add button
|
||||||
|
|
||||||
render () {
|
render () {
|
||||||
const { status, intl, withDismiss, withCounters, showReplyCount, scrollKey } = this.props;
|
const { status, intl, withDismiss, withCounters, showReplyCount, scrollKey } = this.props;
|
||||||
|
|
|
@ -320,11 +320,11 @@ class Status extends ImmutablePureComponent {
|
||||||
if (signedIn) {
|
if (signedIn) {
|
||||||
dispatch(addReaction(statusId, name, url));
|
dispatch(addReaction(statusId, name, url));
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
handleReactionRemove = (statusId, name) => {
|
handleReactionRemove = (statusId, name) => {
|
||||||
this.props.dispatch(removeReaction(statusId, name));
|
this.props.dispatch(removeReaction(statusId, name));
|
||||||
}
|
};
|
||||||
|
|
||||||
handlePin = (status) => {
|
handlePin = (status) => {
|
||||||
if (status.get('pinned')) {
|
if (status.get('pinned')) {
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
class UnreactService < BaseService
|
class UnreactService < BaseService
|
||||||
include Payloadable
|
include Payloadable
|
||||||
|
|
||||||
def call(account, status, emoji)
|
def call(account, status, emoji)
|
||||||
name, domain = emoji.split('@')
|
name, domain = emoji.split('@')
|
||||||
custom_emoji = CustomEmoji.find_by(shortcode: name, domain: domain)
|
custom_emoji = CustomEmoji.find_by(shortcode: name, domain: domain)
|
||||||
reaction = StatusReaction.find_by(account: account, status: status, name: name, custom_emoji: custom_emoji)
|
reaction = StatusReaction.find_by(account: account, status: status, name: name, custom_emoji: custom_emoji)
|
||||||
|
|
|
@ -45,3 +45,8 @@ en:
|
||||||
body: "%{name} reacted to your post:"
|
body: "%{name} reacted to your post:"
|
||||||
subject: "%{name} reacted to your post"
|
subject: "%{name} reacted to your post"
|
||||||
title: New reaction
|
title: New reaction
|
||||||
|
notification_mailer:
|
||||||
|
reaction:
|
||||||
|
body: "%{name} reacted to your post:"
|
||||||
|
subject: "%{name} reacted to your post"
|
||||||
|
title: New reaction
|
||||||
|
|
Loading…
Reference in a new issue