diff --git a/ui/component/claimPreviewTile/index.js b/ui/component/claimPreviewTile/index.js index 056b849b3..997f5708c 100644 --- a/ui/component/claimPreviewTile/index.js +++ b/ui/component/claimPreviewTile/index.js @@ -8,8 +8,10 @@ import { doFileGet, makeSelectChannelForClaimUri, selectBlockedChannels, + makeSelectClaimIsNsfw, } from 'lbry-redux'; import { selectBlackListedOutpoints, selectFilteredOutpoints } from 'lbryinc'; +import { selectShowMatureContent } from 'redux/selectors/settings'; import ClaimPreviewTile from './view'; const select = (state, props) => ({ @@ -21,6 +23,8 @@ const select = (state, props) => ({ blackListedOutpoints: selectBlackListedOutpoints(state), filteredOutpoints: selectFilteredOutpoints(state), blockedChannelUris: selectBlockedChannels(state), + showMature: selectShowMatureContent(state), + isMature: makeSelectClaimIsNsfw(props.uri)(state), }); const perform = dispatch => ({ diff --git a/ui/component/claimPreviewTile/view.jsx b/ui/component/claimPreviewTile/view.jsx index fa15acb2a..2f6a33751 100644 --- a/ui/component/claimPreviewTile/view.jsx +++ b/ui/component/claimPreviewTile/view.jsx @@ -36,6 +36,8 @@ type Props = { getFile: string => void, placeholder: boolean, streamingUrl: string, + isMature: boolean, + showMature: boolean, }; function ClaimPreviewTile(props: Props) { @@ -53,6 +55,8 @@ function ClaimPreviewTile(props: Props) { getFile, streamingUrl, blockedChannelUris, + isMature, + showMature, } = props; const isRepost = claim && claim.repost_channel_url; const shouldFetch = claim === undefined; @@ -100,6 +104,12 @@ function ClaimPreviewTile(props: Props) { let shouldHide = false; + if (isMature && !showMature) { + // Unfortunately needed until this is resolved + // https://github.com/lbryio/lbry-sdk/issues/2785 + shouldHide = true; + } + // This will be replaced once blocking is done at the wallet server level if (claim && !shouldHide && blackListedOutpoints) { shouldHide = blackListedOutpoints.some(