@ -508,8 +508,21 @@ class Status extends ImmutablePureComponent {
const { isExpanded , isCollapsed , forceFilter } = this . state ;
const { isExpanded , isCollapsed , forceFilter } = this . state ;
let background = null ;
let background = null ;
let attachments = null ;
let attachments = null ;
let media = [ ] ;
let mediaIcons = [ ] ;
// Depending on user settings, some media are considered as parts of the
// contents (affected by CW) while other will be displayed outside of the
// CW.
let contentMedia = [ ] ;
let contentMediaIcons = [ ] ;
let extraMedia = [ ] ;
let extraMediaIcons = [ ] ;
let media = contentMedia ;
let mediaIcons = contentMediaIcons ;
if ( settings . getIn ( [ 'content_warnings' , 'media_outside' ] ) ) {
media = extraMedia ;
mediaIcons = extraMediaIcons ;
}
if ( status === null ) {
if ( status === null ) {
return null ;
return null ;
@ -681,8 +694,8 @@ class Status extends ImmutablePureComponent {
}
}
if ( status . get ( 'poll' ) ) {
if ( status . get ( 'poll' ) ) {
m edia. push ( < PollContainer pollId = { status . get ( 'poll' ) } / > ) ;
contentM edia. push ( < PollContainer pollId = { status . get ( 'poll' ) } / > ) ;
m ediaIcons. push ( 'tasks' ) ;
contentM ediaIcons. push ( 'tasks' ) ;
}
}
// Here we prepare extra data-* attributes for CSS selectors.
// Here we prepare extra data-* attributes for CSS selectors.
@ -748,7 +761,7 @@ class Status extends ImmutablePureComponent {
< / s p a n >
< / s p a n >
< StatusIcons
< StatusIcons
status = { status }
status = { status }
mediaIcons = { mediaIcons }
mediaIcons = { contentMediaIcons. concat ( extraMediaIcons ) }
collapsible = { settings . getIn ( [ 'collapsed' , 'enabled' ] ) }
collapsible = { settings . getIn ( [ 'collapsed' , 'enabled' ] ) }
collapsed = { isCollapsed }
collapsed = { isCollapsed }
setCollapsed = { setCollapsed }
setCollapsed = { setCollapsed }
@ -757,8 +770,8 @@ class Status extends ImmutablePureComponent {
< / h e a d e r >
< / h e a d e r >
< StatusContent
< StatusContent
status = { status }
status = { status }
media = { m edia}
media = { contentM edia}
mediaIcons = { m ediaIcons}
mediaIcons = { contentM ediaIcons}
expanded = { isExpanded }
expanded = { isExpanded }
onExpandedToggle = { this . handleExpandedToggle }
onExpandedToggle = { this . handleExpandedToggle }
parseClick = { parseClick }
parseClick = { parseClick }
@ -766,6 +779,9 @@ class Status extends ImmutablePureComponent {
tagLinks = { settings . get ( 'tag_misleading_links' ) }
tagLinks = { settings . get ( 'tag_misleading_links' ) }
rewriteMentions = { settings . get ( 'rewrite_mentions' ) }
rewriteMentions = { settings . get ( 'rewrite_mentions' ) }
/ >
/ >
{ extraMedia }
{ ! isCollapsed || ! ( muted || ! settings . getIn ( [ 'collapsed' , 'show_action_bar' ] ) ) ? (
{ ! isCollapsed || ! ( muted || ! settings . getIn ( [ 'collapsed' , 'show_action_bar' ] ) ) ? (
< StatusActionBar
< StatusActionBar
{ ... other }
{ ... other }