summaryrefslogtreecommitdiffstats
path: root/web/react/components/center_panel.jsx
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2016-02-26 11:19:05 -0500
committerChristopher Speller <crspeller@gmail.com>2016-02-26 11:19:05 -0500
commit53d0bce1da190d45ffd8dbf4afcf7e8b2878bad5 (patch)
tree53043d11186353b54e107466e72c55178e874a22 /web/react/components/center_panel.jsx
parent3734145f9676946792a3efab842812e547cbdab1 (diff)
parentd563bf11527698bef02fc4b17852e260ba43f4e8 (diff)
downloadchat-53d0bce1da190d45ffd8dbf4afcf7e8b2878bad5.tar.gz
chat-53d0bce1da190d45ffd8dbf4afcf7e8b2878bad5.tar.bz2
chat-53d0bce1da190d45ffd8dbf4afcf7e8b2878bad5.zip
Merge pull request #2257 from mattermost/rhs-profile-fix
Final fixes for user store changes
Diffstat (limited to 'web/react/components/center_panel.jsx')
-rw-r--r--web/react/components/center_panel.jsx9
1 files changed, 5 insertions, 4 deletions
diff --git a/web/react/components/center_panel.jsx b/web/react/components/center_panel.jsx
index 97c615768..2422588cf 100644
--- a/web/react/components/center_panel.jsx
+++ b/web/react/components/center_panel.jsx
@@ -33,7 +33,8 @@ export default class CenterPanel extends React.Component {
this.state = {
showTutorialScreens: tutorialStep === TutorialSteps.INTRO_SCREENS,
showPostFocus: ChannelStore.getPostMode() === ChannelStore.POST_MODE_FOCUS,
- user: UserStore.getCurrentUser()
+ user: UserStore.getCurrentUser(),
+ profiles: JSON.parse(JSON.stringify(UserStore.getProfiles()))
};
}
componentDidMount() {
@@ -54,7 +55,7 @@ export default class CenterPanel extends React.Component {
this.setState({showPostFocus: ChannelStore.getPostMode() === ChannelStore.POST_MODE_FOCUS});
}
onUserChange() {
- this.setState({user: UserStore.getCurrentUser()});
+ this.setState({user: UserStore.getCurrentUser(), profiles: JSON.parse(JSON.stringify(UserStore.getProfiles()))});
}
render() {
const channel = ChannelStore.getCurrent();
@@ -65,7 +66,7 @@ export default class CenterPanel extends React.Component {
postsContainer = <TutorialIntroScreens/>;
createPost = null;
} else if (this.state.showPostFocus) {
- postsContainer = <PostFocusView/>;
+ postsContainer = <PostFocusView profiles={this.state.profiles}/>;
handleClick = function clickHandler(e) {
e.preventDefault();
@@ -87,7 +88,7 @@ export default class CenterPanel extends React.Component {
</div>
);
} else {
- postsContainer = <PostsViewContainer/>;
+ postsContainer = <PostsViewContainer profiles={this.state.profiles}/>;
createPost = (
<div
className='post-create__container'