Merge branch 'master' into glitch-soc/merge-upstream

pull/1200/head
Thibaut Girka 2019-08-20 20:30:44 +02:00
commit 81d2d71094
2 changed files with 7 additions and 1 deletions

View File

@ -96,6 +96,12 @@ export default class MediaItem extends ImmutablePureComponent {
if (attachment.get('type') === 'unknown') {
// Skip
} else if (attachment.get('type') === 'audio') {
thumbnail = (
<span className='account-gallery__item__icons'>
<Icon id='music' />
</span>
);
} else if (attachment.get('type') === 'image') {
const focusX = attachment.getIn(['meta', 'focus', 'x']) || 0;
const focusY = attachment.getIn(['meta', 'focus', 'y']) || 0;

View File

@ -100,7 +100,7 @@ class AccountGallery extends ImmutablePureComponent {
}
handleOpenMedia = attachment => {
if (attachment.get('type') === 'video') {
if (['video', 'audio'].includes(attachment.get('type'))) {
this.props.dispatch(openModal('VIDEO', { media: attachment, status: attachment.get('status') }));
} else {
const media = attachment.getIn(['status', 'media_attachments']);