File tree Expand file tree Collapse file tree
app/javascript/mastodon/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -234,15 +234,19 @@ export default class StatusContent extends React.PureComponent {
234234 </ div >
235235 ) ;
236236 } else if ( this . props . onClick ) {
237- return (
237+ const output = [
238238 < div className = { classNames } ref = { this . setRef } tabIndex = '0' style = { directionStyle } onMouseDown = { this . handleMouseDown } onMouseUp = { this . handleMouseUp } >
239239 < div className = 'status__content__text status__content__text--visible' style = { directionStyle } dangerouslySetInnerHTML = { content } lang = { status . get ( 'language' ) } />
240240
241- { ! ! this . state . collapsed && readMoreButton }
242-
243241 { ! ! status . get ( 'poll' ) && < PollContainer pollId = { status . get ( 'poll' ) } /> }
244- </ div >
245- ) ;
242+ </ div > ,
243+ ] ;
244+
245+ if ( this . state . collapsed ) {
246+ output . push ( readMoreButton ) ;
247+ }
248+
249+ return output ;
246250 } else {
247251 return (
248252 < div className = { classNames } ref = { this . setRef } tabIndex = '0' style = { directionStyle } >
You can’t perform that action at this time.
0 commit comments