Skip to content
Extraits de code Groupes Projets
Valider b48c7ee0 rédigé par ThibG's avatar ThibG Validation de Eugen Rochko
Parcourir les fichiers

Fix handling of audio files in account media gallery (#11629)

Fixes #11627
parent 97af209c
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -96,6 +96,12 @@ export default class MediaItem extends ImmutablePureComponent { ...@@ -96,6 +96,12 @@ export default class MediaItem extends ImmutablePureComponent {
if (attachment.get('type') === 'unknown') { if (attachment.get('type') === 'unknown') {
// Skip // Skip
} else if (attachment.get('type') === 'audio') {
thumbnail = (
<span className='account-gallery__item__icons'>
<Icon id='music' />
</span>
);
} else if (attachment.get('type') === 'image') { } else if (attachment.get('type') === 'image') {
const focusX = attachment.getIn(['meta', 'focus', 'x']) || 0; const focusX = attachment.getIn(['meta', 'focus', 'x']) || 0;
const focusY = attachment.getIn(['meta', 'focus', 'y']) || 0; const focusY = attachment.getIn(['meta', 'focus', 'y']) || 0;
......
...@@ -100,7 +100,7 @@ class AccountGallery extends ImmutablePureComponent { ...@@ -100,7 +100,7 @@ class AccountGallery extends ImmutablePureComponent {
} }
handleOpenMedia = attachment => { 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') })); this.props.dispatch(openModal('VIDEO', { media: attachment, status: attachment.get('status') }));
} else { } else {
const media = attachment.getIn(['status', 'media_attachments']); const media = attachment.getIn(['status', 'media_attachments']);
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter