From 5c61a1de0e192935a01a3611cb0d1dec6826d5e9 Mon Sep 17 00:00:00 2001 From: jessop Date: Thu, 1 Aug 2019 20:56:25 -0400 Subject: [PATCH] blocked channels are filtered from claim search and images are obscured --- src/ui/component/channelThumbnail/view.jsx | 7 ++++--- src/ui/component/claimList/view.jsx | 4 +++- src/ui/component/claimListDiscover/index.js | 9 ++++++++- src/ui/component/claimListDiscover/view.jsx | 4 ++++ src/ui/component/claimPreview/view.jsx | 8 ++++++-- src/ui/page/channel/view.jsx | 12 ++++++++++-- src/ui/page/listBlocked/view.jsx | 1 + src/ui/scss/component/_channel.scss | 4 ++++ 8 files changed, 40 insertions(+), 9 deletions(-) diff --git a/src/ui/component/channelThumbnail/view.jsx b/src/ui/component/channelThumbnail/view.jsx index 383be9ec1..9d73f4c25 100644 --- a/src/ui/component/channelThumbnail/view.jsx +++ b/src/ui/component/channelThumbnail/view.jsx @@ -9,10 +9,11 @@ type Props = { uri: string, className?: string, thumbnailPreview: ?string, + obscure?: boolean, }; function ChannelThumbnail(props: Props) { - const { thumbnail, uri, className, thumbnailPreview } = props; + const { thumbnail, uri, className, thumbnailPreview, obscure } = props; // Generate a random color class based on the first letter of the channel name const { channelName } = parseURI(uri); @@ -25,8 +26,8 @@ function ChannelThumbnail(props: Props) { [colorClassName]: !thumbnail, })} > - {!thumbnail && } - {thumbnail && } + {(!thumbnail || obscure) && } + {!obscure && thumbnail && } ); } diff --git a/src/ui/component/claimList/view.jsx b/src/ui/component/claimList/view.jsx index 8959ecb17..cce1efae6 100644 --- a/src/ui/component/claimList/view.jsx +++ b/src/ui/component/claimList/view.jsx @@ -26,6 +26,7 @@ type Props = { id?: string, // If using the default header, this is a unique ID needed to persist the state of the filter setting persistedStorageKey?: string, + showHiddenByUser: boolean, }; export default function ClaimList(props: Props) { @@ -43,6 +44,7 @@ export default function ClaimList(props: Props) { pageSize, page, id, + showHiddenByUser, } = props; const [scrollBottomCbMap, setScrollBottomCbMap] = useState({}); const [currentSort, setCurrentSort] = usePersistedState(persistedStorageKey, SORT_NEW); @@ -113,7 +115,7 @@ export default function ClaimList(props: Props) {