From c1693827aeea8e14c1dadd94506d5cf74635dd40 Mon Sep 17 00:00:00 2001 From: mayaeh Date: Fri, 28 Dec 2018 11:51:32 +0900 Subject: [PATCH] Change the icon to "reply-all" when reply to other accounts (#9378) --- app/javascript/mastodon/components/status_action_bar.js | 5 ++++- .../mastodon/features/status/components/action_bar.js | 9 ++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/app/javascript/mastodon/components/status_action_bar.js b/app/javascript/mastodon/components/status_action_bar.js index 68a1fda24..becd44ec0 100644 --- a/app/javascript/mastodon/components/status_action_bar.js +++ b/app/javascript/mastodon/components/status_action_bar.js @@ -148,6 +148,7 @@ class StatusActionBar extends ImmutablePureComponent { let menu = []; let reblogIcon = 'retweet'; + let replyIcon; let replyTitle; menu.push({ text: intl.formatMessage(messages.open), action: this.handleOpen }); @@ -190,8 +191,10 @@ class StatusActionBar extends ImmutablePureComponent { } if (status.get('in_reply_to_id', null) === null) { + replyIcon = 'reply'; replyTitle = intl.formatMessage(messages.reply); } else { + replyIcon = 'reply-all'; replyTitle = intl.formatMessage(messages.replyAll); } @@ -201,7 +204,7 @@ class StatusActionBar extends ImmutablePureComponent { return (
-
{obfuscatedCount(status.get('replies_count'))}
+
{obfuscatedCount(status.get('replies_count'))}
{shareButton} diff --git a/app/javascript/mastodon/features/status/components/action_bar.js b/app/javascript/mastodon/features/status/components/action_bar.js index 565009be2..3b30d33b2 100644 --- a/app/javascript/mastodon/features/status/components/action_bar.js +++ b/app/javascript/mastodon/features/status/components/action_bar.js @@ -151,6 +151,13 @@ class ActionBar extends React.PureComponent {
); + let replyIcon; + if (status.get('in_reply_to_id', null) === null) { + replyIcon = 'reply'; + } else { + replyIcon = 'reply-all'; + } + let reblogIcon = 'retweet'; if (status.get('visibility') === 'direct') reblogIcon = 'envelope'; else if (status.get('visibility') === 'private') reblogIcon = 'lock'; @@ -159,7 +166,7 @@ class ActionBar extends React.PureComponent { return (
-
+
{shareButton}