diff --git a/app/soapbox/selectors/index.js b/app/soapbox/selectors/index.js index 7249927fc..0ee8a7ca4 100644 --- a/app/soapbox/selectors/index.js +++ b/app/soapbox/selectors/index.js @@ -136,12 +136,10 @@ export const getAccountGallery = createSelector([ (state, id) => state.getIn(['timelines', `account:${id}:media`, 'items'], ImmutableList()), state => state.get('statuses'), ], (statusIds, statuses) => { - let medias = ImmutableList(); - statusIds.forEach(statusId => { + return statusIds.reduce((medias, statusId) => { const status = statuses.get(statusId); - medias = medias.concat(status.get('media_attachments').map(media => media.set('status', status))); - }); - - return medias; + if (status.get('reblogged') !== false) return medias; + return medias.concat(status.get('media_attachments').map(media => media.set('status', status))); + }, ImmutableList()); });