|
|
@ -91,6 +91,7 @@ class Status extends ImmutablePureComponent { |
|
|
|
cachedMediaWidth: PropTypes.number, |
|
|
|
|
|
|
|
sonsIds: ImmutablePropTypes.list, |
|
|
|
onPreview: PropTypes.func |
|
|
|
}; |
|
|
|
|
|
|
|
// Avoid checking props that are functions (and whose equality will always
|
|
|
@ -100,6 +101,7 @@ class Status extends ImmutablePureComponent { |
|
|
|
'account', |
|
|
|
'muted', |
|
|
|
'hidden', |
|
|
|
'sonsIds' |
|
|
|
]; |
|
|
|
|
|
|
|
state = { |
|
|
@ -110,6 +112,10 @@ class Status extends ImmutablePureComponent { |
|
|
|
// Track height changes we know about to compensate scrolling
|
|
|
|
componentDidMount () { |
|
|
|
this.didShowCard = !this.props.muted && !this.props.hidden && this.props.status && this.props.status.get('card'); |
|
|
|
if(this.props.com_prev) { |
|
|
|
const { status } = this.props; |
|
|
|
this.props.onPreview(status.get('id')); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
getSnapshotBeforeUpdate () { |
|
|
@ -260,7 +266,7 @@ class Status extends ImmutablePureComponent { |
|
|
|
handleHotkeyToggleSensitive = () => { |
|
|
|
this.handleToggleMediaVisibility(); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
_properStatus () { |
|
|
|
const { status } = this.props; |
|
|
|
|
|
|
@ -275,22 +281,8 @@ class Status extends ImmutablePureComponent { |
|
|
|
this.node = c; |
|
|
|
} |
|
|
|
|
|
|
|
renderChildren (list) { |
|
|
|
/* |
|
|
|
return list.map(id => ( |
|
|
|
<DetailedStatus |
|
|
|
key = {id} |
|
|
|
status={status} |
|
|
|
onOpenVideo={this.nothing} |
|
|
|
onOpenMedia={this.nothing} |
|
|
|
onToggleHidden={this.nothing} |
|
|
|
domain={"domain"} |
|
|
|
showMedia={this.nothing} |
|
|
|
onToggleMediaVisibility={this.nothing} |
|
|
|
/> |
|
|
|
|
|
|
|
)); |
|
|
|
*/ |
|
|
|
renderChildren (list) { |
|
|
|
return list.map(id => ( |
|
|
|
<StatusContainer |
|
|
|
key={id} |
|
|
@ -485,7 +477,7 @@ class Status extends ImmutablePureComponent { |
|
|
|
<div className={classNames('status__wrapper', `status__wrapper-${status.get('visibility')}`, { 'status__wrapper-reply': !!status.get('in_reply_to_id'), read: unread === false, focusable: !this.props.muted }, (deep!=null) && 'tree-'+tree_type)} tabIndex={this.props.muted ? null : 0} data-featured={featured ? 'true' : null} aria-label={textForScreenReader(intl, status, rebloggedByText)} ref={this.handleRef}> |
|
|
|
{prepend} |
|
|
|
|
|
|
|
<div className={classNames('status', `status-${status.get('visibility')}`, { 'status-reply': !!status.get('in_reply_to_id'), muted: this.props.muted, read: unread === false })} data-id={status.get('id')}> |
|
|
|
<div className={classNames('status', `status-${status.get('visibility')}`, { 'status-reply': !!status.get('in_reply_to_id'), muted: this.props.muted, read: unread === false })} data-id={status.get('id')} > |
|
|
|
<div className='status__expand' onClick={this.handleExpandClick} role='presentation' /> |
|
|
|
<div className='status__info'> |
|
|
|
<a href={status.get('url')} className='status__relative-time' target='_blank' rel='noopener'><RelativeTimestamp timestamp={status.get('created_at')} /></a> |
|
|
|