User display names now update immediately after changing display setting (#3155)
Этот коммит содержится в:
@@ -182,6 +182,7 @@ export default class Post extends React.Component {
|
|||||||
user={this.props.user}
|
user={this.props.user}
|
||||||
currentUser={this.props.currentUser}
|
currentUser={this.props.currentUser}
|
||||||
compactDisplay={this.props.compactDisplay}
|
compactDisplay={this.props.compactDisplay}
|
||||||
|
displayNameType={this.props.displayNameType}
|
||||||
/>
|
/>
|
||||||
<PostBody
|
<PostBody
|
||||||
post={post}
|
post={post}
|
||||||
|
|||||||
@@ -19,7 +19,12 @@ export default class PostHeader extends React.Component {
|
|||||||
render() {
|
render() {
|
||||||
const post = this.props.post;
|
const post = this.props.post;
|
||||||
|
|
||||||
let userProfile = <UserProfile user={this.props.user}/>;
|
let userProfile = (
|
||||||
|
<UserProfile
|
||||||
|
user={this.props.user}
|
||||||
|
displayNameType={this.props.displayNameType}
|
||||||
|
/>
|
||||||
|
);
|
||||||
let botIndicator;
|
let botIndicator;
|
||||||
|
|
||||||
if (post.props && post.props.from_webhook) {
|
if (post.props && post.props.from_webhook) {
|
||||||
@@ -80,5 +85,6 @@ PostHeader.propTypes = {
|
|||||||
isLastComment: React.PropTypes.bool.isRequired,
|
isLastComment: React.PropTypes.bool.isRequired,
|
||||||
handleCommentClick: React.PropTypes.func.isRequired,
|
handleCommentClick: React.PropTypes.func.isRequired,
|
||||||
sameUser: React.PropTypes.bool.isRequired,
|
sameUser: React.PropTypes.bool.isRequired,
|
||||||
compactDisplay: React.PropTypes.bool
|
compactDisplay: React.PropTypes.bool,
|
||||||
|
displayNameType: React.PropTypes.string
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -39,6 +39,10 @@ export default class UserProfile extends React.Component {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (nextProps.displayNameType !== this.props.displayNameType) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
render() {
|
render() {
|
||||||
@@ -138,5 +142,6 @@ UserProfile.propTypes = {
|
|||||||
user: React.PropTypes.object,
|
user: React.PropTypes.object,
|
||||||
overwriteName: React.PropTypes.string,
|
overwriteName: React.PropTypes.string,
|
||||||
overwriteImage: React.PropTypes.string,
|
overwriteImage: React.PropTypes.string,
|
||||||
disablePopover: React.PropTypes.bool
|
disablePopover: React.PropTypes.bool,
|
||||||
|
displayNameType: React.PropTypes.string
|
||||||
};
|
};
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user