diff options
-rw-r--r-- | webapp/components/post_view/components/post.jsx | 21 | ||||
-rw-r--r-- | webapp/components/rhs_comment.jsx | 14 | ||||
-rw-r--r-- | webapp/components/rhs_root_post.jsx | 11 | ||||
-rw-r--r-- | webapp/components/search_results_item.jsx | 3 |
4 files changed, 31 insertions, 18 deletions
diff --git a/webapp/components/post_view/components/post.jsx b/webapp/components/post_view/components/post.jsx index 6a5994469..870d4e1af 100644 --- a/webapp/components/post_view/components/post.jsx +++ b/webapp/components/post_view/components/post.jsx @@ -199,16 +199,6 @@ export default class Post extends React.Component { /> ); - if (this.props.compactDisplay) { - profilePic = ( - <ProfilePicture - src='' - status={this.props.status} - user={this.props.user} - /> - ); - } - if (PostUtils.isSystemMessage(post)) { profilePic = ( <span @@ -224,11 +214,20 @@ export default class Post extends React.Component { } let compactClass = ''; - const profilePicContainer = (<div className='post__img'>{profilePic}</div>); if (this.props.compactDisplay) { compactClass = 'post--compact'; + + profilePic = ( + <ProfilePicture + src='' + status={this.props.status} + user={this.props.user} + /> + ); } + const profilePicContainer = (<div className='post__img'>{profilePic}</div>); + let dropdownOpenedClass = ''; if (this.state.dropdownOpened) { dropdownOpenedClass = 'post--hovered'; diff --git a/webapp/components/rhs_comment.jsx b/webapp/components/rhs_comment.jsx index c22e0c4dc..c8fd698b0 100644 --- a/webapp/components/rhs_comment.jsx +++ b/webapp/components/rhs_comment.jsx @@ -276,7 +276,7 @@ export default class RhsComment extends React.Component { ); } - const profilePic = ( + let profilePic = ( <ProfilePicture src={PostUtils.getProfilePicSrcForPost(post, timestamp)} status={this.props.status} @@ -287,12 +287,20 @@ export default class RhsComment extends React.Component { ); let compactClass = ''; - let profilePicContainer = (<div className='post__img'>{profilePic}</div>); if (this.props.compactDisplay) { compactClass = 'post--compact'; - profilePicContainer = ''; + + profilePic = ( + <ProfilePicture + src='' + status={this.props.status} + user={this.props.user} + /> + ); } + const profilePicContainer = (<div className='post__img'>{profilePic}</div>); + let fileAttachment = null; if (post.file_ids && post.file_ids.length > 0) { fileAttachment = ( diff --git a/webapp/components/rhs_root_post.jsx b/webapp/components/rhs_root_post.jsx index 27446c85a..b8aeeed2d 100644 --- a/webapp/components/rhs_root_post.jsx +++ b/webapp/components/rhs_root_post.jsx @@ -302,12 +302,19 @@ export default class RhsRootPost extends React.Component { } let compactClass = ''; - let profilePicContainer = (<div className='post__img'>{profilePic}</div>); if (this.props.compactDisplay) { compactClass = 'post--compact'; - profilePicContainer = ''; + + profilePic = ( + <ProfilePicture + src='' + status={this.props.status} + user={this.props.user} + /> + ); } + const profilePicContainer = (<div className='post__img'>{profilePic}</div>); const messageWrapper = <PostMessageContainer post={post}/>; let flag; diff --git a/webapp/components/search_results_item.jsx b/webapp/components/search_results_item.jsx index a03bb22ad..698d68bba 100644 --- a/webapp/components/search_results_item.jsx +++ b/webapp/components/search_results_item.jsx @@ -106,10 +106,9 @@ export default class SearchResultsItem extends React.Component { ); let compactClass = ''; - let profilePicContainer = (<div className='post__img'>{profilePic}</div>); + const profilePicContainer = (<div className='post__img'>{profilePic}</div>); if (this.props.compactDisplay) { compactClass = 'post--compact'; - profilePicContainer = ''; } let flag; |