diff options
author | Christopher Speller <crspeller@gmail.com> | 2015-10-07 08:28:05 -0400 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2015-10-07 08:28:05 -0400 |
commit | 2cd546370fe633c2b323dba510c2d0ee8a2a1788 (patch) | |
tree | d9b55fb6f82587bbab817b2b3600fca22f88c490 /web/react/components/post_info.jsx | |
parent | db532e7506713790d7d8bd62700ca339a908b2b5 (diff) | |
parent | 384b9d592e73ae423cb0d2d2ae11dbc4b60da17f (diff) | |
download | chat-2cd546370fe633c2b323dba510c2d0ee8a2a1788.tar.gz chat-2cd546370fe633c2b323dba510c2d0ee8a2a1788.tar.bz2 chat-2cd546370fe633c2b323dba510c2d0ee8a2a1788.zip |
Merge pull request #945 from mattermost/plt-433
PLT-433 Allow team admin to delete comments.
Diffstat (limited to 'web/react/components/post_info.jsx')
-rw-r--r-- | web/react/components/post_info.jsx | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/web/react/components/post_info.jsx b/web/react/components/post_info.jsx index dba75ac5f..c1e8979a4 100644 --- a/web/react/components/post_info.jsx +++ b/web/react/components/post_info.jsx @@ -13,12 +13,6 @@ export default class PostInfo extends React.Component { super(props); this.state = {}; } - shouldShowComment(state, type, isOwner) { - if (state === Constants.POST_FAILED || state === Constants.POST_LOADING) { - return false; - } - return isOwner || (this.props.allowReply === 'true' && type !== 'Comment'); - } createDropdown() { var post = this.props.post; var isOwner = UserStore.getCurrentId() === post.user_id; @@ -33,10 +27,6 @@ export default class PostInfo extends React.Component { type = 'Comment'; } - if (!this.shouldShowComment(post.state, type, isOwner)) { - return ''; - } - var dropdownContents = []; var dataComments = 0; if (type === 'Post') { @@ -106,6 +96,10 @@ export default class PostInfo extends React.Component { ); } + if (dropdownContents.length === 0) { + return ''; + } + return ( <div> <a |