Fixed issue with active icons in action bar for like, repost if no active user

• Fixed:
- issue with active icons in action bar for like, repost if no active user
This commit is contained in:
mgabdev 2021-01-25 16:01:55 -05:00
parent 48ecd800cf
commit 5600c94f5a
2 changed files with 5 additions and 5 deletions

View File

@ -208,7 +208,7 @@ class Comment extends ImmutablePureComponent {
<div className={[_s.d, _s.flexRow, _s.mt5].join(' ')}>
<CommentButton
title={intl.formatMessage(status.get('favourited') ? messages.unlike : messages.like)}
title={intl.formatMessage(status.get('favourited') && !!me ? messages.unlike : messages.like)}
onClick={this.handleOnFavorite}
/>
<CommentButton
@ -216,7 +216,7 @@ class Comment extends ImmutablePureComponent {
onClick={this.handleOnReply}
/>
<CommentButton
title={intl.formatMessage(status.get('reblogged') ? messages.unrepost : messages.repost)}
title={intl.formatMessage(status.get('reblogged') && !!me ? messages.unrepost : messages.repost)}
onClick={this.handleOnRepost}
/>
<div ref={this.setMoreNode}>

View File

@ -173,8 +173,8 @@ class StatusActionBar extends ImmutablePureComponent {
<div className={[_s.d, _s.flexRow, _s.py2, _s.w100PC].join(' ')}>
<StatusActionBarItem
title={intl.formatMessage(messages.like)}
icon={!!status.get('favourited') ? 'liked' : 'like'}
active={!!status.get('favourited')}
icon={!!status.get('favourited') && !!me ? 'liked' : 'like'}
active={!!status.get('favourited') && !!me}
onClick={this.handleFavoriteClick}
isCompact={isCompact}
/>
@ -189,7 +189,7 @@ class StatusActionBar extends ImmutablePureComponent {
altTitle={!publicStatus ? intl.formatMessage(messages.cannot_repost) : ''}
icon={!publicStatus ? 'lock' : 'repost'}
disabled={!publicStatus}
active={!!status.get('reblogged')}
active={!!status.get('reblogged') && !!me}
onClick={this.handleRepostClick}
isCompact={isCompact}
/>