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,46 +234,23 @@ export default class StatusContent extends React.PureComponent {
234234 </ div >
235235 ) ;
236236 } else if ( this . props . onClick ) {
237- const output = [
238- < div
239- ref = { this . setRef }
240- tabIndex = '0'
241- key = 'content'
242- className = { classNames }
243- style = { directionStyle }
244- dangerouslySetInnerHTML = { content }
245- lang = { status . get ( 'language' ) }
246- onMouseDown = { this . handleMouseDown }
247- onMouseUp = { this . handleMouseUp }
248- /> ,
249- ] ;
250-
251- if ( this . state . collapsed ) {
252- output . push ( readMoreButton ) ;
253- }
237+ return (
238+ < div className = { classNames } ref = { this . setRef } tabIndex = '0' style = { directionStyle } onMouseDown = { this . handleMouseDown } onMouseUp = { this . handleMouseUp } >
239+ < div className = 'status__content__text status__content__text--visible' style = { directionStyle } dangerouslySetInnerHTML = { content } lang = { status . get ( 'language' ) } />
254240
255- if ( status . get ( 'poll' ) ) {
256- output . push ( < PollContainer pollId = { status . get ( 'poll' ) } /> ) ;
257- }
241+ { ! ! this . state . collapsed && readMoreButton }
258242
259- return output ;
243+ { ! ! status . get ( 'poll' ) && < PollContainer pollId = { status . get ( 'poll' ) } /> }
244+ </ div >
245+ ) ;
260246 } else {
261- const output = [
262- < div
263- tabIndex = '0'
264- ref = { this . setRef }
265- className = 'status__content'
266- style = { directionStyle }
267- dangerouslySetInnerHTML = { content }
268- lang = { status . get ( 'language' ) }
269- /> ,
270- ] ;
271-
272- if ( status . get ( 'poll' ) ) {
273- output . push ( < PollContainer pollId = { status . get ( 'poll' ) } /> ) ;
274- }
247+ return (
248+ < div className = { classNames } ref = { this . setRef } tabIndex = '0' style = { directionStyle } >
249+ < div className = 'status__content__text status__content__text--visible' style = { directionStyle } dangerouslySetInnerHTML = { content } lang = { status . get ( 'language' ) } />
275250
276- return output ;
251+ { ! ! status . get ( 'poll' ) && < PollContainer pollId = { status . get ( 'poll' ) } /> }
252+ </ div >
253+ ) ;
277254 }
278255 }
279256
You can’t perform that action at this time.
0 commit comments