summaryrefslogtreecommitdiffstats
path: root/webapp/components/post.jsx
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2016-04-21 09:56:11 -0400
committerHarrison Healey <harrisonmhealey@gmail.com>2016-04-21 09:56:11 -0400
commit899ee09224799cb8b1dffaea781a18594616b50e (patch)
treee6b57b8458abd864ac92dd0074d73e9f7a5284cf /webapp/components/post.jsx
parentcf1f3ba322ce64ca383ce1a5f0ca3d9bacb180ea (diff)
downloadchat-899ee09224799cb8b1dffaea781a18594616b50e.tar.gz
chat-899ee09224799cb8b1dffaea781a18594616b50e.tar.bz2
chat-899ee09224799cb8b1dffaea781a18594616b50e.zip
Adding option to display channels sanely (#2761)
Diffstat (limited to 'webapp/components/post.jsx')
-rw-r--r--webapp/components/post.jsx14
1 files changed, 12 insertions, 2 deletions
diff --git a/webapp/components/post.jsx b/webapp/components/post.jsx
index 7294cf163..7fabec741 100644
--- a/webapp/components/post.jsx
+++ b/webapp/components/post.jsx
@@ -99,6 +99,10 @@ export default class Post extends React.Component {
return true;
}
+ if (nextProps.center !== this.props.center) {
+ return true;
+ }
+
if (!Utils.areObjectsEqual(nextProps.user, this.props.user)) {
return true;
}
@@ -203,13 +207,18 @@ export default class Post extends React.Component {
}
}
+ let centerClass = '';
+ if (this.props.center) {
+ centerClass = 'center';
+ }
+
return (
<div>
<div
id={'post_' + post.id}
className={'post ' + sameUserClass + ' ' + rootUser + ' ' + postType + ' ' + currentUserCss + ' ' + shouldHighlightClass + ' ' + systemMessageClass}
>
- <div className='post__content'>
+ <div className={'post__content ' + centerClass}>
<div className='post__img'>{profilePic}</div>
<div>
<PostHeader
@@ -251,5 +260,6 @@ Post.propTypes = {
shouldHighlight: React.PropTypes.bool,
displayNameType: React.PropTypes.string,
hasProfiles: React.PropTypes.bool,
- currentUser: React.PropTypes.object.isRequired
+ currentUser: React.PropTypes.object.isRequired,
+ center: React.PropTypes.bool
};