mirror of
https://github.com/mattermost/mattermost.git
synced 2026-08-27 05:37:15 -05:00
User display names now update immediately after changing display setting (#3155)
This commit is contained in:
@@ -182,6 +182,7 @@ export default class Post extends React.Component {
|
||||
user={this.props.user}
|
||||
currentUser={this.props.currentUser}
|
||||
compactDisplay={this.props.compactDisplay}
|
||||
displayNameType={this.props.displayNameType}
|
||||
/>
|
||||
<PostBody
|
||||
post={post}
|
||||
|
||||
@@ -19,7 +19,12 @@ export default class PostHeader extends React.Component {
|
||||
render() {
|
||||
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;
|
||||
|
||||
if (post.props && post.props.from_webhook) {
|
||||
@@ -80,5 +85,6 @@ PostHeader.propTypes = {
|
||||
isLastComment: React.PropTypes.bool.isRequired,
|
||||
handleCommentClick: React.PropTypes.func.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;
|
||||
}
|
||||
|
||||
if (nextProps.displayNameType !== this.props.displayNameType) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
render() {
|
||||
@@ -138,5 +142,6 @@ UserProfile.propTypes = {
|
||||
user: React.PropTypes.object,
|
||||
overwriteName: React.PropTypes.string,
|
||||
overwriteImage: React.PropTypes.string,
|
||||
disablePopover: React.PropTypes.bool
|
||||
disablePopover: React.PropTypes.bool,
|
||||
displayNameType: React.PropTypes.string
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user