diff options
author | ThibG <thib@sitedethib.com> | 2020-02-09 12:56:12 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-09 12:56:12 +0100 |
commit | d3aaa08730901e7c97c6aeb1ebf56f2a027c78a2 (patch) | |
tree | 9fcb99dab28b01e0f85fbe7f27f406f92a031903 /app/javascript/flavours/glitch/features/status/components/action_bar.js | |
parent | a2cfe3daaadabfaad71969a44c460bd76b8405ff (diff) | |
parent | 432033743c409356bd11e0d7d96f14a3cc82fb77 (diff) |
Merge pull request #1280 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/javascript/flavours/glitch/features/status/components/action_bar.js')
-rw-r--r-- | app/javascript/flavours/glitch/features/status/components/action_bar.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/app/javascript/flavours/glitch/features/status/components/action_bar.js b/app/javascript/flavours/glitch/features/status/components/action_bar.js index d71a3ae08..bb53f9288 100644 --- a/app/javascript/flavours/glitch/features/status/components/action_bar.js +++ b/app/javascript/flavours/glitch/features/status/components/action_bar.js @@ -188,7 +188,7 @@ class ActionBar extends React.PureComponent { } } - const shareButton = ('share' in navigator) && status.get('visibility') === 'public' && ( + const shareButton = ('share' in navigator) && publicStatus && ( <div className='detailed-status__button'><IconButton title={intl.formatMessage(messages.share)} icon='share-alt' onClick={this.handleShare} /></div> ); @@ -196,13 +196,12 @@ class ActionBar extends React.PureComponent { //if (status.get('visibility') === 'direct') reblogIcon = 'envelope'; // else if (status.get('visibility') === 'private') reblogIcon = 'lock'; - let reblog_disabled = (status.get('visibility') === 'direct' || (status.get('visibility') === 'private' && me !== status.getIn(['account', 'id']))); let reblog_message = status.get('visibility') === 'private' ? messages.reblog_private : messages.reblog; return ( <div className='detailed-status__action-bar'> <div className='detailed-status__button'><IconButton title={intl.formatMessage(messages.reply)} icon={status.get('in_reply_to_id', null) === null ? 'reply' : 'reply-all'} 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(reblog_message)} icon={reblogIcon} onClick={this.handleReblogClick} /></div> + <div className='detailed-status__button'><IconButton disabled={!publicStatus} active={status.get('reblogged')} title={!publicStatus ? intl.formatMessage(messages.cannot_reblog) : intl.formatMessage(reblog_message)} 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} <div className='detailed-status__button'><IconButton className='bookmark-icon' active={status.get('bookmarked')} title={intl.formatMessage(messages.bookmark)} icon='bookmark' onClick={this.handleBookmarkClick} /></div> |