diff options
author | Joram Wilander <jwawilander@gmail.com> | 2016-08-22 20:36:01 -0400 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2016-08-22 16:36:01 -0800 |
commit | 80d83ae77c85de5666dc88458e2888f66c49cc90 (patch) | |
tree | 3d5a5864662347529899a07e1009f70f5a326df9 /webapp/components/post_view | |
parent | c3c62ad2ad018be6887149e92dd35bb527f55168 (diff) | |
download | chat-80d83ae77c85de5666dc88458e2888f66c49cc90.tar.gz chat-80d83ae77c85de5666dc88458e2888f66c49cc90.tar.bz2 chat-80d83ae77c85de5666dc88458e2888f66c49cc90.zip |
Prevent flagging of deleted posts and don't show deleted posts in flagged post list (#3846)
Diffstat (limited to 'webapp/components/post_view')
-rw-r--r-- | webapp/components/post_view/components/post_info.jsx | 35 |
1 files changed, 21 insertions, 14 deletions
diff --git a/webapp/components/post_view/components/post_info.jsx b/webapp/components/post_view/components/post_info.jsx index d48d97ba1..e95afe3ed 100644 --- a/webapp/components/post_view/components/post_info.jsx +++ b/webapp/components/post_view/components/post_info.jsx @@ -336,6 +336,26 @@ export default class PostInfo extends React.Component { flagFunc = this.flagPost; } + let flagTrigger; + if (!Utils.isPostEphemeral(post)) { + flagTrigger = ( + <OverlayTrigger + key={'flagtooltipkey' + flagVisible} + delayShow={Constants.OVERLAY_TIME_DELAY} + placement='top' + overlay={flagTooltip} + > + <a + href='#' + className={'flag-icon__container ' + flagVisible} + onClick={flagFunc} + > + {flag} + </a> + </OverlayTrigger> + ); + } + return ( <ul className='post__header--info'> <li className='col'> @@ -345,20 +365,7 @@ export default class PostInfo extends React.Component { compactDisplay={this.props.compactDisplay} useMilitaryTime={this.props.useMilitaryTime} /> - <OverlayTrigger - key={'flagtooltipkey' + flagVisible} - delayShow={Constants.OVERLAY_TIME_DELAY} - placement='top' - overlay={flagTooltip} - > - <a - href='#' - className={'flag-icon__container ' + flagVisible} - onClick={flagFunc} - > - {flag} - </a> - </OverlayTrigger> + {flagTrigger} </li> {options} </ul> |