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) {
{sortedUris.map((uri, index) => (
-
+
{index === 4 && injectedItem && injectedItem}
))}
diff --git a/src/ui/component/claimListDiscover/index.js b/src/ui/component/claimListDiscover/index.js
index 1007c230b..7e4f7e5b1 100644
--- a/src/ui/component/claimListDiscover/index.js
+++ b/src/ui/component/claimListDiscover/index.js
@@ -1,6 +1,12 @@
import * as SETTINGS from 'constants/settings';
import { connect } from 'react-redux';
-import { doClaimSearch, selectClaimSearchByQuery, selectFetchingClaimSearch, doToggleTagFollow } from 'lbry-redux';
+import {
+ doClaimSearch,
+ selectClaimSearchByQuery,
+ selectFetchingClaimSearch,
+ doToggleTagFollow,
+ selectBlockedChannels,
+} from 'lbry-redux';
import { selectSubscriptions } from 'redux/selectors/subscriptions';
import { makeSelectClientSetting } from 'redux/selectors/settings';
import ClaimListDiscover from './view';
@@ -10,6 +16,7 @@ const select = state => ({
loading: selectFetchingClaimSearch(state),
subscribedChannels: selectSubscriptions(state),
showNsfw: makeSelectClientSetting(SETTINGS.SHOW_NSFW)(state),
+ hiddenUris: selectBlockedChannels(state),
});
const perform = {
diff --git a/src/ui/component/claimListDiscover/view.jsx b/src/ui/component/claimListDiscover/view.jsx
index de2a606a6..e4d13128a 100644
--- a/src/ui/component/claimListDiscover/view.jsx
+++ b/src/ui/component/claimListDiscover/view.jsx
@@ -44,6 +44,7 @@ type Props = {
claimSearchByQuery: {
[string]: Array,
},
+ hiddenUris: Array,
};
function ClaimListDiscover(props: Props) {
@@ -59,6 +60,7 @@ function ClaimListDiscover(props: Props) {
showNsfw,
history,
location,
+ hiddenUris,
} = props;
const didNavigateForward = history.action === 'PUSH';
const { search, pathname } = location;
@@ -75,6 +77,7 @@ function ClaimListDiscover(props: Props) {
no_totals: boolean,
any_tags: Array,
channel_ids: Array,
+ not_channel_ids: Array,
not_tags: Array,
order_by: Array,
release_time?: string,
@@ -86,6 +89,7 @@ function ClaimListDiscover(props: Props) {
no_totals: true,
any_tags: (personalView && personalSort === SEARCH_SORT_YOU) || !personalView ? tags : [],
channel_ids: personalSort === SEARCH_SORT_CHANNELS ? subscribedChannels.map(sub => sub.uri.split('#')[1]) : [],
+ not_channel_ids: hiddenUris && hiddenUris.length ? hiddenUris.map(hiddenUri => hiddenUri.split('#')[1]) : [],
not_tags: !showNsfw ? MATURE_TAGS : [],
order_by:
typeSort === TYPE_TRENDING
diff --git a/src/ui/component/claimPreview/view.jsx b/src/ui/component/claimPreview/view.jsx
index 5b4b7fa90..9b6246238 100644
--- a/src/ui/component/claimPreview/view.jsx
+++ b/src/ui/component/claimPreview/view.jsx
@@ -102,10 +102,14 @@ function ClaimPreview(props: Props) {
(outpoint.txid === claim.txid && outpoint.nout === claim.nout)
);
}
- // if showUserBlocked wasnt passed to claimPreview (for blocked page) hide user-blocked channels
+ // block stream claims
if (claim && !shouldHide && !showUserBlocked && blockedChannelUris.length && signingChannel) {
shouldHide = blockedChannelUris.some(blockedUri => blockedUri === signingChannel.permanent_url);
}
+ // block channel claims if we can't control for them in claim search
+ if (claim && isChannel && !shouldHide && !showUserBlocked && blockedChannelUris.length && isChannel) {
+ shouldHide = blockedChannelUris.some(blockedUri => blockedUri === claim.permanent_url);
+ }
function handleContextMenu(e) {
e.preventDefault();
@@ -157,7 +161,7 @@ function ClaimPreview(props: Props) {
'claim-preview--pending': pending,
})}
>
- {isChannel ? : }
+ {isChannel ? : }
diff --git a/src/ui/page/channel/view.jsx b/src/ui/page/channel/view.jsx
index b0a9609da..331fda1ff 100644
--- a/src/ui/page/channel/view.jsx
+++ b/src/ui/page/channel/view.jsx
@@ -15,6 +15,7 @@ import ChannelThumbnail from 'component/channelThumbnail';
import ChannelEdit from 'component/channelEdit';
import ClaimUri from 'component/claimUri';
import * as ICONS from 'constants/icons';
+import classnames from 'classnames';
const PAGE_VIEW_QUERY = `view`;
const ABOUT_PAGE = `about`;
@@ -77,11 +78,18 @@ function ChannelPage(props: Props) {