Fix ... for usernames on first page load
Этот коммит содержится в:
@@ -98,7 +98,7 @@ export default class Post extends React.Component {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nextProps.hasProfiles !== this.props.hasProfiles) {
|
if (!Utils.areObjectsEqual(nextProps.user, this.props.user)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -226,7 +226,6 @@ export default class Post extends React.Component {
|
|||||||
posts={posts}
|
posts={posts}
|
||||||
handleCommentClick={this.handleCommentClick}
|
handleCommentClick={this.handleCommentClick}
|
||||||
retryPost={this.retryPost}
|
retryPost={this.retryPost}
|
||||||
hasProfiles={this.props.hasProfiles}
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -246,6 +245,5 @@ Post.propTypes = {
|
|||||||
hideProfilePic: React.PropTypes.bool,
|
hideProfilePic: React.PropTypes.bool,
|
||||||
isLastComment: React.PropTypes.bool,
|
isLastComment: React.PropTypes.bool,
|
||||||
shouldHighlight: React.PropTypes.bool,
|
shouldHighlight: React.PropTypes.bool,
|
||||||
displayNameType: React.PropTypes.string,
|
displayNameType: React.PropTypes.string
|
||||||
hasProfiles: React.PropTypes.bool
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -215,8 +215,7 @@ PostBody.propTypes = {
|
|||||||
post: React.PropTypes.object.isRequired,
|
post: React.PropTypes.object.isRequired,
|
||||||
parentPost: React.PropTypes.object,
|
parentPost: React.PropTypes.object,
|
||||||
retryPost: React.PropTypes.func.isRequired,
|
retryPost: React.PropTypes.func.isRequired,
|
||||||
handleCommentClick: React.PropTypes.func.isRequired,
|
handleCommentClick: React.PropTypes.func.isRequired
|
||||||
hasProfiles: React.PropTypes.bool
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default injectIntl(PostBody);
|
export default injectIntl(PostBody);
|
||||||
|
|||||||
@@ -250,7 +250,6 @@ export default class PostsView extends React.Component {
|
|||||||
shouldHighlight={shouldHighlight}
|
shouldHighlight={shouldHighlight}
|
||||||
onClick={() => EventHelpers.emitPostFocusEvent(post.id)} //eslint-disable-line no-loop-func
|
onClick={() => EventHelpers.emitPostFocusEvent(post.id)} //eslint-disable-line no-loop-func
|
||||||
displayNameType={this.state.displayNameType}
|
displayNameType={this.state.displayNameType}
|
||||||
hasProfiles={profiles && Object.keys(profiles).length > 1}
|
|
||||||
user={profile}
|
user={profile}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -149,11 +149,15 @@ export default class PostsViewContainer extends React.Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
shouldComponentUpdate(nextProps, nextState) {
|
shouldComponentUpdate(nextProps, nextState) {
|
||||||
if (Utils.areObjectsEqual(this.state, nextState)) {
|
if (!Utils.areObjectsEqual(this.state, nextState)) {
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
if (!Utils.areObjectsEqual(this.props, nextProps)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
render() {
|
render() {
|
||||||
const postLists = this.state.postLists;
|
const postLists = this.state.postLists;
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user