summaryrefslogtreecommitdiffstats
path: root/webapp/components/post_body.jsx
diff options
context:
space:
mode:
authorAsaad Mahmood <asaadmahmoodspin@users.noreply.github.com>2016-05-16 17:06:26 +0500
committerChristopher Speller <crspeller@gmail.com>2016-05-16 08:06:26 -0400
commit0258fcfa5c8da92351371169b66ce30462a34853 (patch)
treed69803cff43a633202b877738e514867f4424e0c /webapp/components/post_body.jsx
parent565b111234f5566da632533109e1b4f4044e7116 (diff)
downloadchat-0258fcfa5c8da92351371169b66ce30462a34853.tar.gz
chat-0258fcfa5c8da92351371169b66ce30462a34853.tar.bz2
chat-0258fcfa5c8da92351371169b66ce30462a34853.zip
Adding compact layout (#2991)
* Adding compact layout * Fixing ESLint error
Diffstat (limited to 'webapp/components/post_body.jsx')
-rw-r--r--webapp/components/post_body.jsx9
1 files changed, 8 insertions, 1 deletions
diff --git a/webapp/components/post_body.jsx b/webapp/components/post_body.jsx
index 6c4e97d8e..ed0a133b3 100644
--- a/webapp/components/post_body.jsx
+++ b/webapp/components/post_body.jsx
@@ -24,6 +24,10 @@ export default class PostBody extends React.Component {
return true;
}
+ if (!Utils.areObjectsEqual(nextProps.compactDisplay, this.props.compactDisplay)) {
+ return true;
+ }
+
if (nextProps.retryPost.toString() !== this.props.retryPost.toString()) {
return true;
}
@@ -136,9 +140,11 @@ export default class PostBody extends React.Component {
if (filenames && filenames.length > 0) {
fileAttachmentHolder = (
<FileAttachmentList
+
filenames={filenames}
channelId={post.channel_id}
userId={post.user_id}
+ compactDisplay={this.props.compactDisplay}
/>
);
}
@@ -189,5 +195,6 @@ PostBody.propTypes = {
post: React.PropTypes.object.isRequired,
parentPost: React.PropTypes.object,
retryPost: React.PropTypes.func.isRequired,
- handleCommentClick: React.PropTypes.func.isRequired
+ handleCommentClick: React.PropTypes.func.isRequired,
+ compactDisplay: React.PropTypes.bool
};