enable back media switch on lightbox opened from a message

with several attachments
pull/1381/head
Audric Ackermann 5 years ago
parent 60a4fcbfcc
commit 1bb99ac3df
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

@ -852,14 +852,15 @@ export class SessionConversation extends React.Component<Props, State> {
} }
private onClickAttachment(attachment: any, message: any) { private onClickAttachment(attachment: any, message: any) {
const media = (message.attachments || []).map((attachmentForMedia: any) => {
return {
objectURL: attachmentForMedia.url,
contentType: attachmentForMedia.contentType,
attachment: attachmentForMedia,
};
});
const lightBoxOptions = { const lightBoxOptions = {
media: [ media,
{
objectURL: attachment.url,
contentType: attachment.contentType,
attachment,
},
],
attachment, attachment,
}; };
this.setState({ lightBoxOptions }); this.setState({ lightBoxOptions });

Loading…
Cancel
Save