summaryrefslogtreecommitdiffstats
path: root/webapp/components/post_body.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/components/post_body.jsx')
-rw-r--r--webapp/components/post_body.jsx21
1 files changed, 7 insertions, 14 deletions
diff --git a/webapp/components/post_body.jsx b/webapp/components/post_body.jsx
index 6c4e97d8e..415052d96 100644
--- a/webapp/components/post_body.jsx
+++ b/webapp/components/post_body.jsx
@@ -7,6 +7,7 @@ import * as Utils from 'utils/utils.jsx';
import Constants from 'utils/constants.jsx';
import * as TextFormatting from 'utils/text_formatting.jsx';
import PostBodyAdditionalContent from './post_body_additional_content.jsx';
+import PendingPostActions from './pending_post_actions.jsx';
import {FormattedMessage} from 'react-intl';
@@ -24,7 +25,7 @@ export default class PostBody extends React.Component {
return true;
}
- if (nextProps.retryPost.toString() !== this.props.retryPost.toString()) {
+ if (!Utils.areObjectsEqual(nextProps.compactDisplay, this.props.compactDisplay)) {
return true;
}
@@ -110,18 +111,7 @@ export default class PostBody extends React.Component {
let loading;
if (post.state === Constants.POST_FAILED) {
postClass += ' post--fail';
- loading = (
- <a
- className='theme post-retry pull-right'
- href='#'
- onClick={this.props.retryPost}
- >
- <FormattedMessage
- id='post_body.retry'
- defaultMessage='Retry'
- />
- </a>
- );
+ loading = <PendingPostActions post={this.props.post}/>;
} else if (post.state === Constants.POST_LOADING) {
postClass += ' post-waiting';
loading = (
@@ -136,9 +126,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 +181,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
};