fixed indicator issue

This commit is contained in:
u-e 2019-05-11 18:19:08 +03:00
parent 57d1e98df8
commit 2f9da32e35
5 changed files with 11 additions and 2 deletions

View File

@ -56,6 +56,8 @@ class CommentView extends PureComponent {
marginLeft,
voteCount,
intl,
author,
mainAuthor={mainAuthor}
} = this.props;
const { isShowSubComments, isPressedShowButton } = this.state;
@ -68,7 +70,7 @@ class CommentView extends PureComponent {
reputation={comment.author_reputation}
size={avatarSize || 24}
currentAccountUsername={currentAccountUsername}
isShowOwnerIndicator={currentAccountUsername === comment.author}
isShowOwnerIndicator={mainAuthor === comment.author}
/>
<View style={[{ marginLeft: marginLeft || 29 }, styles.bodyWrapper]}>
<PostBody isComment handleOnUserPress={handleOnUserPress} body={comment.body} />
@ -155,6 +157,7 @@ class CommentView extends PureComponent {
commentCount={comment.children}
isShowMoreButton={false}
fetchPost={fetchPost}
mainAuthor={mainAuthor}
/>
)}
</View>

View File

@ -174,6 +174,7 @@ class CommentsContainer extends Component {
fetchPost,
isShowMoreButton,
selectedFilter,
mainAuthor,
selectedPermlink: _selectedPermlink,
} = this.props;
@ -183,6 +184,7 @@ class CommentsContainer extends Component {
selectedFilter={selectedFilter}
selectedPermlink={_selectedPermlink || selectedPermlink}
author={author}
mainAuthor={mainAuthor}
isShowMoreButton={isShowMoreButton}
commentNumber={commentNumber || 1}
commentCount={commentCount}

View File

@ -26,6 +26,7 @@ class CommentsView extends PureComponent {
render() {
const {
mainAuthor,
avatarSize,
commentCount,
commentNumber,
@ -47,6 +48,7 @@ class CommentsView extends PureComponent {
keyExtractor={this._keyExtractor}
renderItem={({ item }) => (
<Comment
mainAuthor={mainAuthor}
avatarSize={avatarSize}
comment={item}
commentCount={commentCount || item.children}

View File

@ -32,7 +32,7 @@ class CommentsDisplayView extends PureComponent {
render() {
const {
author, commentCount, fetchPost, intl, permlink,
author, commentCount, fetchPost, intl, permlink, mainAuthor
} = this.props;
const { selectedFilter } = this.state;
@ -55,6 +55,7 @@ class CommentsDisplayView extends PureComponent {
commentCount={commentCount}
author={author}
permlink={permlink}
mainAuthor={mainAuthor}
/>
</View>
</Fragment>

View File

@ -168,6 +168,7 @@ class PostDisplayView extends PureComponent {
{post && (isGetComment || isLoadedComments) && (
<CommentsDisplay
author={post.author}
mainAuthor={post.author}
permlink={post.permlink}
commentCount={post.children}
fetchPost={fetchPost}