From 2f24577e7fd573b02615c9cb53f3ac5e9c83154f Mon Sep 17 00:00:00 2001 From: Mary Kate Date: Sat, 15 Aug 2020 15:47:11 -0500 Subject: [PATCH] only show public attachments in profile media panel --- app/soapbox/features/ui/components/profile_media_panel.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/app/soapbox/features/ui/components/profile_media_panel.js b/app/soapbox/features/ui/components/profile_media_panel.js index 200813156..2927c1a63 100644 --- a/app/soapbox/features/ui/components/profile_media_panel.js +++ b/app/soapbox/features/ui/components/profile_media_panel.js @@ -43,11 +43,8 @@ class ProfileMediaPanel extends ImmutablePureComponent { render() { const { attachments, account } = this.props; - const nineAttachments = attachments.slice(0, 9); - // - // if (attachments.isEmpty()) { - // return null; - // } + const publicAttachments = attachments.filter(attachment => attachment.getIn(['status', 'visibility']) === 'public'); + const nineAttachments = publicAttachments.slice(0, 9); return (