From 88790b91de64ad7848477a9edcbebbbe1adb5d13 Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Tue, 27 Mar 2018 15:50:05 +0200 Subject: [Glitch] Display AttachmentList in notifications Port 77406d3a092db48250a85984dde2f2cc81386146 to glitch-soc --- app/javascript/flavours/glitch/components/status.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'app/javascript/flavours/glitch/components/status.js') diff --git a/app/javascript/flavours/glitch/components/status.js b/app/javascript/flavours/glitch/components/status.js index 51f0f8884..2fcc44882 100644 --- a/app/javascript/flavours/glitch/components/status.js +++ b/app/javascript/flavours/glitch/components/status.js @@ -302,16 +302,16 @@ export default class Status extends ImmutablePureComponent { background = status.getIn(['account', 'header']); } - // This handles our media attachments. Note that we don't show media on - // muted (notification) statuses. If the media type is unknown, then we - // simply ignore it. + // This handles our media attachments. + // If a media file is of unknwon type or if the status is muted + // (notification), we show a list of links instead of embedded media. // After we have generated our appropriate media element and stored it in // `media`, we snatch the thumbnail to use as our `background` if media // backgrounds for collapsed statuses are enabled. attachments = status.get('media_attachments'); - if (attachments.size > 0 && !muted) { - if (attachments.some(item => item.get('type') === 'unknown')) { // Media type is 'unknown' + if (attachments.size > 0) { + if (muted || attachments.some(item => item.get('type') === 'unknown')) { media = (