diff options
author | samogot <samogot@gmail.com> | 2016-05-25 23:13:04 +0300 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2016-05-25 16:13:04 -0400 |
commit | d31c972a438e7e9ccc8487f519a915423cb6b93b (patch) | |
tree | bf7c535cbb41c75b97d24b85d9f1903605f6d96d /webapp/components/post_body.jsx | |
parent | dd18b98b0b8c6dfd3011e527367844e8af920edb (diff) | |
download | chat-d31c972a438e7e9ccc8487f519a915423cb6b93b.tar.gz chat-d31c972a438e7e9ccc8487f519a915423cb6b93b.tar.bz2 chat-d31c972a438e7e9ccc8487f519a915423cb6b93b.zip |
PLT-1042 allow cancel pending post (#3053)
Diffstat (limited to 'webapp/components/post_body.jsx')
-rw-r--r-- | webapp/components/post_body.jsx | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/webapp/components/post_body.jsx b/webapp/components/post_body.jsx index ed0a133b3..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'; @@ -28,10 +29,6 @@ export default class PostBody extends React.Component { return true; } - if (nextProps.retryPost.toString() !== this.props.retryPost.toString()) { - return true; - } - if (nextProps.handleCommentClick.toString() !== this.props.handleCommentClick.toString()) { return true; } @@ -114,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 = ( |