about summary refs log tree commit diff
path: root/app/javascript/mastodon/features/status/components/action_bar.js
diff options
context:
space:
mode:
authormayaeh <mayaeh@marimo-net.org>2018-12-28 11:51:32 +0900
committerEugen Rochko <eugen@zeonfederated.com>2018-12-28 03:51:32 +0100
commitc1693827aeea8e14c1dadd94506d5cf74635dd40 (patch)
tree5910e565d9d7d4a6dfae5991e05083bf0872ea05 /app/javascript/mastodon/features/status/components/action_bar.js
parent6e49907ecfc7036b6bf2dd91b9ebf4ba62d16080 (diff)
Change the icon to "reply-all" when reply to other accounts (#9378)
Diffstat (limited to 'app/javascript/mastodon/features/status/components/action_bar.js')
-rw-r--r--app/javascript/mastodon/features/status/components/action_bar.js9
1 files changed, 8 insertions, 1 deletions
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 {
       <div className='detailed-status__button'><IconButton title={intl.formatMessage(messages.share)} icon='share-alt' onClick={this.handleShare} /></div>
     );
 
+    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 (
       <div className='detailed-status__action-bar'>
-        <div className='detailed-status__button'><IconButton title={intl.formatMessage(messages.reply)} icon='reply' onClick={this.handleReplyClick} /></div>
+        <div className='detailed-status__button'><IconButton title={intl.formatMessage(messages.reply)} icon={status.get('in_reply_to_account_id') === status.getIn(['account', 'id']) ? 'reply' : replyIcon} onClick={this.handleReplyClick} /></div>
         <div className='detailed-status__button'><IconButton disabled={reblog_disabled} active={status.get('reblogged')} title={reblog_disabled ? intl.formatMessage(messages.cannot_reblog) : intl.formatMessage(messages.reblog)} icon={reblogIcon} onClick={this.handleReblogClick} /></div>
         <div className='detailed-status__button'><IconButton className='star-icon' animate active={status.get('favourited')} title={intl.formatMessage(messages.favourite)} icon='star' onClick={this.handleFavouriteClick} /></div>
         {shareButton}