|
|
@ -5,6 +5,7 @@ import DisplayName from '../../../components/display_name'; |
|
|
|
import StatusContent from '../../../components/status_content'; |
|
|
|
import MediaGallery from '../../../components/media_gallery'; |
|
|
|
import VideoPlayer from '../../../components/video_player'; |
|
|
|
import AttachmentList from '../../../components/attachment_list'; |
|
|
|
import { Link } from 'react-router'; |
|
|
|
import { FormattedDate, FormattedNumber } from 'react-intl'; |
|
|
|
import CardContainer from '../containers/card_container'; |
|
|
@ -40,7 +41,9 @@ const DetailedStatus = React.createClass({ |
|
|
|
let applicationLink = ''; |
|
|
|
|
|
|
|
if (status.get('media_attachments').size > 0) { |
|
|
|
if (status.getIn(['media_attachments', 0, 'type']) === 'video') { |
|
|
|
if (status.get('media_attachments').some(item => item.get('type') === 'unknown')) { |
|
|
|
media = <AttachmentList media={status.get('media_attachments')} />; |
|
|
|
} else if (status.getIn(['media_attachments', 0, 'type']) === 'video') { |
|
|
|
media = <VideoPlayer sensitive={status.get('sensitive')} media={status.getIn(['media_attachments', 0])} width={300} height={150} onOpenVideo={this.props.onOpenVideo} autoplay />; |
|
|
|
} else { |
|
|
|
media = <MediaGallery sensitive={status.get('sensitive')} media={status.get('media_attachments')} height={300} onOpenMedia={this.props.onOpenMedia} autoPlayGif={this.props.autoPlayGif} />; |
|
|
|