diff --git a/extras/lbryinc/constants/action_types.js b/extras/lbryinc/constants/action_types.js index 65723007d..a7e994b5e 100644 --- a/extras/lbryinc/constants/action_types.js +++ b/extras/lbryinc/constants/action_types.js @@ -50,18 +50,6 @@ export const GET_SUGGESTED_SUBSCRIPTIONS_FAIL = 'GET_SUGGESTED_SUBSCRIPTIONS_FAI export const SUBSCRIPTION_FIRST_RUN_COMPLETED = 'SUBSCRIPTION_FIRST_RUN_COMPLETED'; export const VIEW_SUGGESTED_SUBSCRIPTIONS = 'VIEW_SUGGESTED_SUBSCRIPTIONS'; -// Blacklist -export const FETCH_BLACK_LISTED_CONTENT_STARTED = 'FETCH_BLACK_LISTED_CONTENT_STARTED'; -export const FETCH_BLACK_LISTED_CONTENT_COMPLETED = 'FETCH_BLACK_LISTED_CONTENT_COMPLETED'; -export const FETCH_BLACK_LISTED_CONTENT_FAILED = 'FETCH_BLACK_LISTED_CONTENT_FAILED'; -export const BLACK_LISTED_CONTENT_SUBSCRIBE = 'BLACK_LISTED_CONTENT_SUBSCRIBE'; - -// Filtered list -export const FETCH_FILTERED_CONTENT_STARTED = 'FETCH_FILTERED_CONTENT_STARTED'; -export const FETCH_FILTERED_CONTENT_COMPLETED = 'FETCH_FILTERED_CONTENT_COMPLETED'; -export const FETCH_FILTERED_CONTENT_FAILED = 'FETCH_FILTERED_CONTENT_FAILED'; -export const FILTERED_CONTENT_SUBSCRIBE = 'FILTERED_CONTENT_SUBSCRIBE'; - // Cost Info export const FETCH_COST_INFO_STARTED = 'FETCH_COST_INFO_STARTED'; export const FETCH_COST_INFO_COMPLETED = 'FETCH_COST_INFO_COMPLETED'; diff --git a/extras/lbryinc/index.js b/extras/lbryinc/index.js index df1b0f823..267ab39d2 100644 --- a/extras/lbryinc/index.js +++ b/extras/lbryinc/index.js @@ -14,8 +14,6 @@ export { doTransifexUpload } from 'util/transifex-upload'; // actions export { doGenerateAuthToken } from './redux/actions/auth'; export { doFetchCostInfoForUri } from './redux/actions/cost_info'; -export { doBlackListedOutpointsSubscribe } from './redux/actions/blacklist'; -export { doFilteredOutpointsSubscribe } from './redux/actions/filtered'; export { doFetchViewCount, doFetchSubCount } from './redux/actions/stats'; export { doCheckSync, @@ -30,8 +28,6 @@ export { // reducers export { authReducer } from './redux/reducers/auth'; export { costInfoReducer } from './redux/reducers/cost_info'; -export { blacklistReducer } from './redux/reducers/blacklist'; -export { filteredReducer } from './redux/reducers/filtered'; export { statsReducer } from './redux/reducers/stats'; export { syncReducer } from './redux/reducers/sync'; @@ -43,17 +39,10 @@ export { selectAllCostInfoByUri, selectFetchingCostInfo, } from './redux/selectors/cost_info'; -export { - selectBlackListedOutpoints, - selectBlacklistedOutpointMap, -} from './redux/selectors/blacklist'; -export { selectFilteredOutpoints, selectFilteredOutpointMap } from './redux/selectors/filtered'; export { selectViewCount, selectViewCountForUri, - // makeSelectViewCountForUri, // deprecated selectSubCountForUri, - // makeSelectSubCountForUri, // deprecated } from './redux/selectors/stats'; export { selectBanStateForUri } from './redux/selectors/ban'; export { diff --git a/extras/lbryinc/redux/actions/blacklist.js b/extras/lbryinc/redux/actions/blacklist.js deleted file mode 100644 index 4e0008691..000000000 --- a/extras/lbryinc/redux/actions/blacklist.js +++ /dev/null @@ -1,52 +0,0 @@ -import { Lbryio } from 'lbryinc'; -import * as ACTIONS from 'constants/action_types'; - -const CHECK_BLACK_LISTED_CONTENT_INTERVAL = 60 * 60 * 1000; - -export function doFetchBlackListedOutpoints() { - return dispatch => { - dispatch({ - type: ACTIONS.FETCH_BLACK_LISTED_CONTENT_STARTED, - }); - - const success = ({ outpoints }) => { - const splitOutpoints = []; - if (outpoints) { - outpoints.forEach((outpoint, index) => { - const [txid, nout] = outpoint.split(':'); - - splitOutpoints[index] = { txid, nout: Number.parseInt(nout, 10) }; - }); - } - - dispatch({ - type: ACTIONS.FETCH_BLACK_LISTED_CONTENT_COMPLETED, - data: { - outpoints: splitOutpoints, - success: true, - }, - }); - }; - - const failure = ({ message: error }) => { - dispatch({ - type: ACTIONS.FETCH_BLACK_LISTED_CONTENT_FAILED, - data: { - error, - success: false, - }, - }); - }; - - Lbryio.call('file', 'list_blocked', { - auth_token: '', - }).then(success, failure); - }; -} - -export function doBlackListedOutpointsSubscribe() { - return dispatch => { - dispatch(doFetchBlackListedOutpoints()); - setInterval(() => dispatch(doFetchBlackListedOutpoints()), CHECK_BLACK_LISTED_CONTENT_INTERVAL); - }; -} diff --git a/extras/lbryinc/redux/actions/filtered.js b/extras/lbryinc/redux/actions/filtered.js deleted file mode 100644 index 4777c591d..000000000 --- a/extras/lbryinc/redux/actions/filtered.js +++ /dev/null @@ -1,47 +0,0 @@ -import { Lbryio } from 'lbryinc'; -import * as ACTIONS from 'constants/action_types'; - -const CHECK_FILTERED_CONTENT_INTERVAL = 60 * 60 * 1000; - -export function doFetchFilteredOutpoints() { - return dispatch => { - dispatch({ - type: ACTIONS.FETCH_FILTERED_CONTENT_STARTED, - }); - - const success = ({ outpoints }) => { - let formattedOutpoints = []; - if (outpoints) { - formattedOutpoints = outpoints.map(outpoint => { - const [txid, nout] = outpoint.split(':'); - return { txid, nout: Number.parseInt(nout, 10) }; - }); - } - - dispatch({ - type: ACTIONS.FETCH_FILTERED_CONTENT_COMPLETED, - data: { - outpoints: formattedOutpoints, - }, - }); - }; - - const failure = ({ error }) => { - dispatch({ - type: ACTIONS.FETCH_FILTERED_CONTENT_FAILED, - data: { - error, - }, - }); - }; - - Lbryio.call('file', 'list_filtered', { auth_token: '' }).then(success, failure); - }; -} - -export function doFilteredOutpointsSubscribe() { - return dispatch => { - dispatch(doFetchFilteredOutpoints()); - setInterval(() => dispatch(doFetchFilteredOutpoints()), CHECK_FILTERED_CONTENT_INTERVAL); - }; -} diff --git a/extras/lbryinc/redux/reducers/blacklist.js b/extras/lbryinc/redux/reducers/blacklist.js deleted file mode 100644 index 48d74b1ff..000000000 --- a/extras/lbryinc/redux/reducers/blacklist.js +++ /dev/null @@ -1,37 +0,0 @@ -import * as ACTIONS from 'constants/action_types'; -import { handleActions } from 'util/redux-utils'; - -const defaultState = { - fetchingBlackListedOutpoints: false, - fetchingBlackListedOutpointsSucceed: undefined, - blackListedOutpoints: undefined, -}; - -export const blacklistReducer = handleActions( - { - [ACTIONS.FETCH_BLACK_LISTED_CONTENT_STARTED]: state => ({ - ...state, - fetchingBlackListedOutpoints: true, - }), - [ACTIONS.FETCH_BLACK_LISTED_CONTENT_COMPLETED]: (state, action) => { - const { outpoints, success } = action.data; - return { - ...state, - fetchingBlackListedOutpoints: false, - fetchingBlackListedOutpointsSucceed: success, - blackListedOutpoints: outpoints, - }; - }, - [ACTIONS.FETCH_BLACK_LISTED_CONTENT_FAILED]: (state, action) => { - const { error, success } = action.data; - - return { - ...state, - fetchingBlackListedOutpoints: false, - fetchingBlackListedOutpointsSucceed: success, - fetchingBlackListedOutpointsError: error, - }; - }, - }, - defaultState -); diff --git a/extras/lbryinc/redux/reducers/filtered.js b/extras/lbryinc/redux/reducers/filtered.js deleted file mode 100644 index 02147156d..000000000 --- a/extras/lbryinc/redux/reducers/filtered.js +++ /dev/null @@ -1,34 +0,0 @@ -import * as ACTIONS from 'constants/action_types'; -import { handleActions } from 'util/redux-utils'; - -const defaultState = { - loading: false, - filteredOutpoints: undefined, -}; - -export const filteredReducer = handleActions( - { - [ACTIONS.FETCH_FILTERED_CONTENT_STARTED]: state => ({ - ...state, - loading: true, - }), - [ACTIONS.FETCH_FILTERED_CONTENT_COMPLETED]: (state, action) => { - const { outpoints } = action.data; - return { - ...state, - loading: false, - filteredOutpoints: outpoints, - }; - }, - [ACTIONS.FETCH_FILTERED_CONTENT_FAILED]: (state, action) => { - const { error } = action.data; - - return { - ...state, - loading: false, - fetchingFilteredOutpointsError: error, - }; - }, - }, - defaultState -); diff --git a/extras/lbryinc/redux/selectors/ban.js b/extras/lbryinc/redux/selectors/ban.js index 88cec158b..a34d65fd1 100644 --- a/extras/lbryinc/redux/selectors/ban.js +++ b/extras/lbryinc/redux/selectors/ban.js @@ -8,18 +8,15 @@ import { createCachedSelector } from 're-reselect'; import { selectClaimForUri, makeSelectIsBlacklisted } from 'redux/selectors/claims'; import { selectMutedChannels } from 'redux/selectors/blocked'; import { selectModerationBlockList } from 'redux/selectors/comments'; -import { selectBlacklistedOutpointMap, selectFilteredOutpointMap } from 'lbryinc'; import { getChannelFromClaim } from 'util/claim'; import { isURIEqual } from 'util/lbryURI'; export const selectBanStateForUri = createCachedSelector( selectClaimForUri, - selectBlacklistedOutpointMap, - selectFilteredOutpointMap, selectMutedChannels, selectModerationBlockList, (state, uri) => makeSelectIsBlacklisted(uri)(state), - (claim, blackListedOutpointMap, filteredOutpointMap, mutedChannelUris, personalBlocklist, isBlacklisted) => { + (claim, mutedChannelUris, personalBlocklist, isBlacklisted) => { const banState = {}; if (!claim) { @@ -32,27 +29,6 @@ export const selectBanStateForUri = createCachedSelector( banState['blacklisted'] = true; } - // This will be replaced once blocking is done at the wallet server level. - if (blackListedOutpointMap) { - if ( - (channelClaim && blackListedOutpointMap[`${channelClaim.txid}:${channelClaim.nout}`]) || - blackListedOutpointMap[`${claim.txid}:${claim.nout}`] - ) { - banState['blacklisted'] = true; - } - } - - // We're checking to see if the stream outpoint or signing channel outpoint - // is in the filter list. - if (filteredOutpointMap) { - if ( - (channelClaim && filteredOutpointMap[`${channelClaim.txid}:${channelClaim.nout}`]) || - filteredOutpointMap[`${claim.txid}:${claim.nout}`] - ) { - banState['filtered'] = true; - } - } - // block stream claims // block channel claims if we can't control for them in claim search if (mutedChannelUris.length && channelClaim) { diff --git a/extras/lbryinc/redux/selectors/blacklist.js b/extras/lbryinc/redux/selectors/blacklist.js deleted file mode 100644 index ed0d8ccb1..000000000 --- a/extras/lbryinc/redux/selectors/blacklist.js +++ /dev/null @@ -1,20 +0,0 @@ -import { createSelector } from 'reselect'; - -export const selectState = state => state.blacklist || {}; - -export const selectBlackListedOutpoints = createSelector( - selectState, - state => state.blackListedOutpoints -); - -export const selectBlacklistedOutpointMap = createSelector( - selectBlackListedOutpoints, - outpoints => - outpoints - ? outpoints.reduce((acc, val) => { - const outpoint = `${val.txid}:${val.nout}`; - acc[outpoint] = 1; - return acc; - }, {}) - : {} -); diff --git a/extras/lbryinc/redux/selectors/filtered.js b/extras/lbryinc/redux/selectors/filtered.js deleted file mode 100644 index 46ea2b1fc..000000000 --- a/extras/lbryinc/redux/selectors/filtered.js +++ /dev/null @@ -1,20 +0,0 @@ -import { createSelector } from 'reselect'; - -export const selectState = state => state.filtered || {}; - -export const selectFilteredOutpoints = createSelector( - selectState, - state => state.filteredOutpoints -); - -export const selectFilteredOutpointMap = createSelector( - selectFilteredOutpoints, - outpoints => - outpoints - ? outpoints.reduce((acc, val) => { - const outpoint = `${val.txid}:${val.nout}`; - acc[outpoint] = 1; - return acc; - }, {}) - : {} -); diff --git a/flow-typed/Claim.js b/flow-typed/Claim.js index 4c3a63150..08e3190a9 100644 --- a/flow-typed/Claim.js +++ b/flow-typed/Claim.js @@ -167,6 +167,7 @@ declare type ClaimErrorCensor = { take_over_height: number, }, name: string, + text: string, normalized_name: string, nout: number, permanent_url: string, diff --git a/flow-typed/Lbry.js b/flow-typed/Lbry.js index f913e15cc..abf8cebb5 100644 --- a/flow-typed/Lbry.js +++ b/flow-typed/Lbry.js @@ -75,7 +75,16 @@ declare type BalanceResponse = { declare type ResolveResponse = { // Keys are the url(s) passed to resolve - [string]: { error?: {}, stream?: StreamClaim, channel?: ChannelClaim, collection?: CollectionClaim, claimsInChannel?: number }, + [string]: { + error?: { + censor?: {}, + text?: string, + }, + stream?: StreamClaim, + channel?: ChannelClaim, + collection?: CollectionClaim, + claimsInChannel?: number + }, }; declare type GetResponse = FileListItem & { error?: string }; diff --git a/flow-typed/npm/lbryinc_vx.x.x.js b/flow-typed/npm/lbryinc_vx.x.x.js index e796c99c3..30ba9faf9 100644 --- a/flow-typed/npm/lbryinc_vx.x.x.js +++ b/flow-typed/npm/lbryinc_vx.x.x.js @@ -82,10 +82,6 @@ declare module 'lbryinc/src/redux/reducers/auth' { declare module.exports: any; } -declare module 'lbryinc/src/redux/reducers/blacklist' { - declare module.exports: any; -} - declare module 'lbryinc/src/redux/reducers/cost_info' { declare module.exports: any; } @@ -212,9 +208,6 @@ declare module 'lbryinc/src/redux/actions/user.js' { declare module 'lbryinc/src/redux/reducers/auth.js' { declare module.exports: $Exports<'lbryinc/src/redux/reducers/auth'>; } -declare module 'lbryinc/src/redux/reducers/blacklist.js' { - declare module.exports: $Exports<'lbryinc/src/redux/reducers/blacklist'>; -} declare module 'lbryinc/src/redux/reducers/cost_info.js' { declare module.exports: $Exports<'lbryinc/src/redux/reducers/cost_info'>; } diff --git a/static/app-strings.json b/static/app-strings.json index 756121275..fd870d5c1 100644 --- a/static/app-strings.json +++ b/static/app-strings.json @@ -2319,5 +2319,8 @@ "Your hub has blocked this content because it subscribes to the following blocking channel:": "Your hub has blocked this content because it subscribes to the following blocking channel:", "Your hub has blocked access to this content do to a complaint received under the US Digital Millennium Copyright Act.": "Your hub has blocked access to this content do to a complaint received under the US Digital Millennium Copyright Act.", "Autoplay Next is on.": "Autoplay Next is on.", + "Content Blocked": "Content Blocked", + "Your hub has blocked %content% because it subscribes to the following blocking channel:": "Your hub has blocked %content% because it subscribes to the following blocking channel:", + "Your hub has blocked %content% because it subscribes to %channel%. You can change your hub in %settings%.": "Your hub has blocked %content% because it subscribes to %channel%. You can change your hub in %settings%.", "--end--": "--end--" } diff --git a/ui/component/collectionPreviewTile/index.js b/ui/component/collectionPreviewTile/index.js index 82cdd90b8..c3050977a 100644 --- a/ui/component/collectionPreviewTile/index.js +++ b/ui/component/collectionPreviewTile/index.js @@ -19,7 +19,6 @@ import { import { doFetchItemsInCollection, doCollectionDelete } from 'redux/actions/collections'; import { doResolveUri } from 'redux/actions/claims'; import { selectMutedChannels } from 'redux/selectors/blocked'; -import { selectBlackListedOutpoints, selectFilteredOutpoints } from 'lbryinc'; import { selectShowMatureContent } from 'redux/selectors/settings'; import CollectionPreviewTile from './view'; @@ -42,8 +41,6 @@ const select = (state, props) => { isResolvingUri: collectionUri && selectIsUriResolving(state, collectionUri), thumbnail: getThumbnailFromClaim(claim), title: collectionUri && selectTitleForUri(state, collectionUri), - blackListedOutpoints: selectBlackListedOutpoints(state), - filteredOutpoints: selectFilteredOutpoints(state), blockedChannelUris: selectMutedChannels(state), showMature: selectShowMatureContent(state), isMature: makeSelectClaimIsNsfw(collectionUri)(state), diff --git a/ui/component/collectionPreviewTile/view.jsx b/ui/component/collectionPreviewTile/view.jsx index 33e36f39f..6690343c5 100644 --- a/ui/component/collectionPreviewTile/view.jsx +++ b/ui/component/collectionPreviewTile/view.jsx @@ -25,14 +25,6 @@ type Props = { thumbnail?: string, title?: string, placeholder: boolean, - blackListedOutpoints: Array<{ - txid: string, - nout: number, - }>, - filteredOutpoints: Array<{ - txid: string, - nout: number, - }>, blockedChannelUris: Array, isMature?: boolean, showMature: boolean, diff --git a/ui/component/previewLink/index.js b/ui/component/previewLink/index.js index 1df8f7807..2cba36f21 100644 --- a/ui/component/previewLink/index.js +++ b/ui/component/previewLink/index.js @@ -8,7 +8,6 @@ import { makeSelectMetadataItemForUri, } from 'redux/selectors/claims'; import { doResolveUri } from 'redux/actions/claims'; -import { selectBlackListedOutpoints } from 'lbryinc'; import PreviewLink from './view'; const select = (state, props) => { @@ -22,7 +21,6 @@ const select = (state, props) => { description: makeSelectMetadataItemForUri(props.uri, 'description')(state), channelIsMine: selectClaimIsMine(state, claim), isResolvingUri: selectIsUriResolving(state, props.uri), - blackListedOutpoints: selectBlackListedOutpoints(state), }; }; diff --git a/ui/component/viewers/videoViewer/internal/videojs.jsx b/ui/component/viewers/videoViewer/internal/videojs.jsx index 11e77a892..344622d84 100644 --- a/ui/component/viewers/videoViewer/internal/videojs.jsx +++ b/ui/component/viewers/videoViewer/internal/videojs.jsx @@ -9,7 +9,7 @@ import eventTracking from 'videojs-event-tracking'; import * as OVERLAY from './overlays'; import './plugins/videojs-mobile-ui/plugin'; import hlsQualitySelector from './plugins/videojs-hls-quality-selector/plugin'; -import recsys from './plugins/videojs-recsys/plugin'; +// import recsys from './plugins/videojs-recsys/plugin'; // points to view tracking plugin import qualityLevels from 'videojs-contrib-quality-levels'; import LbryVolumeBarClass from './lbry-volume-bar'; import keyboardShorcuts from './videojs-keyboard-shortcuts'; @@ -92,9 +92,9 @@ if (!Object.keys(videojs.getPlugins()).includes('qualityLevels')) { videojs.registerPlugin('qualityLevels', qualityLevels); } -if (!Object.keys(videojs.getPlugins()).includes('recsys')) { - videojs.registerPlugin('recsys', recsys); -} +// if (!Object.keys(videojs.getPlugins()).includes('recsys')) { +// videojs.registerPlugin('recsys', recsys); +// } // **************************************************************************** // VideoJs diff --git a/ui/constants/action_types.js b/ui/constants/action_types.js index 00cf938e4..e05fe428f 100644 --- a/ui/constants/action_types.js +++ b/ui/constants/action_types.js @@ -470,18 +470,6 @@ export const REPORT_CONTENT_STARTED = 'REPORT_CONTENT_STARTED'; export const REPORT_CONTENT_COMPLETED = 'REPORT_CONTENT_COMPLETED'; export const REPORT_CONTENT_FAILED = 'REPORT_CONTENT_FAILED'; -// Blacklist -export const FETCH_BLACK_LISTED_CONTENT_STARTED = 'FETCH_BLACK_LISTED_CONTENT_STARTED'; -export const FETCH_BLACK_LISTED_CONTENT_COMPLETED = 'FETCH_BLACK_LISTED_CONTENT_COMPLETED'; -export const FETCH_BLACK_LISTED_CONTENT_FAILED = 'FETCH_BLACK_LISTED_CONTENT_FAILED'; -export const BLACK_LISTED_CONTENT_SUBSCRIBE = 'BLACK_LISTED_CONTENT_SUBSCRIBE'; - -// Filtered list -export const FETCH_FILTERED_CONTENT_STARTED = 'FETCH_FILTERED_CONTENT_STARTED'; -export const FETCH_FILTERED_CONTENT_COMPLETED = 'FETCH_FILTERED_CONTENT_COMPLETED'; -export const FETCH_FILTERED_CONTENT_FAILED = 'FETCH_FILTERED_CONTENT_FAILED'; -export const FILTERED_CONTENT_SUBSCRIBE = 'FILTERED_CONTENT_SUBSCRIBE'; - // Stats export const FETCH_VIEW_COUNT_STARTED = 'FETCH_VIEW_COUNT_STARTED'; export const FETCH_VIEW_COUNT_FAILED = 'FETCH_VIEW_COUNT_FAILED'; diff --git a/ui/index.jsx b/ui/index.jsx index 995618625..101e9bba8 100644 --- a/ui/index.jsx +++ b/ui/index.jsx @@ -29,7 +29,7 @@ import { import { isURIValid } from 'util/lbryURI'; import { setSearchApi } from 'redux/actions/search'; import { doSetLanguage, doFetchLanguage, doUpdateIsNightAsync } from 'redux/actions/settings'; -import { Lbryio, doBlackListedOutpointsSubscribe, doFilteredOutpointsSubscribe } from 'lbryinc'; +import { Lbryio } from 'lbryinc'; import rewards from 'rewards'; import { store, persistor, history } from 'store'; import app from './app'; @@ -274,8 +274,6 @@ function AppWrapper() { } app.store.dispatch(doUpdateIsNightAsync()); app.store.dispatch(doDaemonReady()); - app.store.dispatch(doBlackListedOutpointsSubscribe()); - app.store.dispatch(doFilteredOutpointsSubscribe()); const appReadyTime = Date.now(); const timeToStart = appReadyTime - startTime; diff --git a/ui/page/channel/index.js b/ui/page/channel/index.js index 5e537a3d2..7a2006d68 100644 --- a/ui/page/channel/index.js +++ b/ui/page/channel/index.js @@ -9,7 +9,7 @@ import { makeSelectClaimIsPending, } from 'redux/selectors/claims'; import { selectMyUnpublishedCollections } from 'redux/selectors/collections'; -import { selectBlackListedOutpoints, doFetchSubCount, selectSubCountForUri } from 'lbryinc'; // ban state +import { doFetchSubCount, selectSubCountForUri } from 'lbryinc'; // ban state import { selectYoutubeChannels } from 'redux/selectors/user'; import { selectIsSubscribedForUri } from 'redux/selectors/subscriptions'; import { selectModerationBlockList } from 'redux/selectors/comments'; @@ -28,7 +28,6 @@ const select = (state, props) => { page: selectCurrentChannelPage(state), claim, isSubscribed: selectIsSubscribedForUri(state, props.uri), - blackListedOutpoints: selectBlackListedOutpoints(state), subCount: selectSubCountForUri(state, props.uri), pending: makeSelectClaimIsPending(props.uri)(state), youtubeChannels: selectYoutubeChannels(state), diff --git a/ui/page/channel/view.jsx b/ui/page/channel/view.jsx index 9cc4960c1..ea7c18166 100644 --- a/ui/page/channel/view.jsx +++ b/ui/page/channel/view.jsx @@ -50,10 +50,6 @@ type Props = { channelIsMine: boolean, isSubscribed: boolean, channelIsBlocked: boolean, - blackListedOutpoints: Array<{ - txid: string, - nout: number, - }>, fetchSubCount: (string) => void, subCount: number, pending: boolean, @@ -72,7 +68,6 @@ function ChannelPage(props: Props) { // page, ?page= may come back some day? channelIsMine, isSubscribed, - blackListedOutpoints, fetchSubCount, subCount, pending, @@ -135,14 +130,6 @@ function ChannelPage(props: Props) { collectionEmpty =
{__('No Lists Found')}
; } - let channelIsBlackListed = false; - - if (claim && blackListedOutpoints) { - channelIsBlackListed = blackListedOutpoints.some( - (outpoint) => outpoint.txid === claim.txid && outpoint.nout === claim.nout - ); - } - // If a user changes tabs, update the url so it stays on the same page if they refresh. // We don't want to use links here because we can't animate the tab change and using links // would alter the Tab label's role attribute, which should stay role="tab" to work with keyboards/screen readers. @@ -219,9 +206,9 @@ function ChannelPage(props: Props) { navigate={`/$/${PAGES.CHANNELS}`} /> )} - {!channelIsBlackListed && } + {!(isBlocked || isMuted) && } - {!(isBlocked || isMuted) && (!channelIsBlackListed || isSubscribed) && } + {!(isBlocked || isMuted) && isSubscribed && } {/* TODO: add channel collections */} @@ -293,7 +280,6 @@ function ChannelPage(props: Props) { {currentView === PAGE.CONTENT && ( {__('No Content Found')}} @@ -302,13 +288,7 @@ function ChannelPage(props: Props) { {currentView === PAGE.LISTS && ( - + )} diff --git a/ui/page/show/view.jsx b/ui/page/show/view.jsx index 6618c2b88..78227d651 100644 --- a/ui/page/show/view.jsx +++ b/ui/page/show/view.jsx @@ -1,12 +1,12 @@ // @flow import * as PAGES from 'constants/pages'; +import I18nMessage from 'component/i18nMessage'; import React, { useEffect } from 'react'; import { Redirect, useHistory } from 'react-router-dom'; import Spinner from 'component/spinner'; import ChannelPage from 'page/channel'; import Page from 'component/page'; import Button from 'component/button'; -import Card from 'component/common/card'; import { formatLbryUrlForWeb } from 'util/url'; import { parseURI } from 'util/lbryURI'; import * as COLLECTIONS_CONSTS from 'constants/collections'; @@ -117,6 +117,7 @@ function ShowPage(props: Props) { {!isResolvingUri && !isSubscribed && (
- -
- } - /> +
+ +
+ } + /> + ) : ( - - {__('Your hub has blocked this content because it subscribes to the following blocking channel:')}{' '} -