remove anonymous setting code
This commit is contained in:
parent
f056c7baec
commit
4a9e90b45a
6 changed files with 5 additions and 14 deletions
|
@ -15,7 +15,7 @@ import {
|
|||
doPrepareEdit,
|
||||
} from 'lbry-redux';
|
||||
import { selectBlackListedOutpoints, selectFilteredOutpoints } from 'lbryinc';
|
||||
import { selectShowMatureContent, selectShowAnonymousContent } from 'redux/selectors/settings';
|
||||
import { selectShowMatureContent } from 'redux/selectors/settings';
|
||||
import { makeSelectHasVisitedUri } from 'redux/selectors/content';
|
||||
import { makeSelectIsSubscribed } from 'redux/selectors/subscriptions';
|
||||
import { push } from 'connected-react-router';
|
||||
|
@ -26,7 +26,6 @@ const select = (state, props) => ({
|
|||
pending: props.uri && makeSelectClaimIsPending(props.uri)(state),
|
||||
claim: props.uri && makeSelectClaimForUri(props.uri)(state),
|
||||
obscureNsfw: !selectShowMatureContent(state),
|
||||
hideAnonymous: !selectShowAnonymousContent(state),
|
||||
claimIsMine: props.uri && makeSelectClaimIsMine(props.uri)(state),
|
||||
isResolvingUri: props.uri && makeSelectIsUriResolving(props.uri)(state),
|
||||
thumbnail: props.uri && makeSelectThumbnailForUri(props.uri)(state),
|
||||
|
|
|
@ -22,7 +22,6 @@ type Props = {
|
|||
uri: string,
|
||||
claim: ?Claim,
|
||||
obscureNsfw: boolean,
|
||||
hideAnonymous: boolean,
|
||||
showUserBlocked: boolean,
|
||||
claimIsMine: boolean,
|
||||
pending?: boolean,
|
||||
|
@ -55,7 +54,6 @@ type Props = {
|
|||
const ClaimPreview = forwardRef<any, {}>((props: Props, ref: any) => {
|
||||
const {
|
||||
obscureNsfw,
|
||||
hideAnonymous,
|
||||
claimIsMine,
|
||||
pending,
|
||||
history,
|
||||
|
@ -101,9 +99,8 @@ const ClaimPreview = forwardRef<any, {}>((props: Props, ref: any) => {
|
|||
const isChannel = isValid ? parseURI(uri).isChannel : false;
|
||||
const includeChannelTooltip = type !== 'inline' && type !== 'tooltip' && !isChannel;
|
||||
const signingChannel = claim && claim.signing_channel;
|
||||
const isAnonymous = !isChannel && !signingChannel;
|
||||
const blocked = !claimIsMine && ((obscureNsfw && nsfw) || (hideAnonymous && isAnonymous));
|
||||
let shouldHide = placeholder !== 'loading' && ((abandoned && !showPublishLink) || (blocked && !showUserBlocked));
|
||||
let shouldHide =
|
||||
placeholder !== 'loading' && ((abandoned && !showPublishLink) || (!claimIsMine && obscureNsfw && nsfw));
|
||||
|
||||
// This will be replaced once blocking is done at the wallet server level
|
||||
if (claim && !shouldHide && blackListedOutpoints) {
|
||||
|
|
|
@ -10,7 +10,6 @@ import SettingsPage from './view';
|
|||
const select = state => ({
|
||||
daemonSettings: selectDaemonSettings(state),
|
||||
showNsfw: makeSelectClientSetting(SETTINGS.SHOW_MATURE)(state),
|
||||
showAnonymous: makeSelectClientSetting(SETTINGS.SHOW_ANONYMOUS)(state),
|
||||
instantPurchaseEnabled: makeSelectClientSetting(SETTINGS.INSTANT_PURCHASE_ENABLED)(state),
|
||||
instantPurchaseMax: makeSelectClientSetting(SETTINGS.INSTANT_PURCHASE_MAX)(state),
|
||||
currentTheme: makeSelectClientSetting(SETTINGS.THEME)(state),
|
||||
|
|
|
@ -47,7 +47,6 @@ type Props = {
|
|||
clearCache: () => Promise<any>,
|
||||
daemonSettings: DaemonSettings,
|
||||
showNsfw: boolean,
|
||||
showAnonymous: boolean,
|
||||
instantPurchaseEnabled: boolean,
|
||||
instantPurchaseMax: Price,
|
||||
currentTheme: string,
|
||||
|
@ -178,7 +177,6 @@ class SettingsPage extends React.PureComponent<Props, State> {
|
|||
const {
|
||||
daemonSettings,
|
||||
showNsfw,
|
||||
showAnonymous,
|
||||
instantPurchaseEnabled,
|
||||
instantPurchaseMax,
|
||||
currentTheme,
|
||||
|
@ -374,14 +372,14 @@ class SettingsPage extends React.PureComponent<Props, State> {
|
|||
)}
|
||||
/>
|
||||
|
||||
<FormField
|
||||
{/* <FormField
|
||||
type="checkbox"
|
||||
name="show_anonymous"
|
||||
onChange={() => setClientSetting(SETTINGS.SHOW_ANONYMOUS, !showAnonymous)}
|
||||
checked={showAnonymous}
|
||||
label={__('Show anonymous content')}
|
||||
helper={__('Anonymous content is published without a channel.')}
|
||||
/>
|
||||
/> */}
|
||||
|
||||
<FormField
|
||||
type="checkbox"
|
||||
|
|
|
@ -36,7 +36,6 @@ const defaultState = {
|
|||
|
||||
// Content
|
||||
[SETTINGS.SHOW_MATURE]: false,
|
||||
[SETTINGS.SHOW_ANONYMOUS]: true,
|
||||
[SETTINGS.AUTOPLAY]: true,
|
||||
[SETTINGS.FLOATING_PLAYER]: true,
|
||||
[SETTINGS.AUTO_DOWNLOAD]: true,
|
||||
|
|
|
@ -26,7 +26,6 @@ export const makeSelectClientSetting = setting =>
|
|||
|
||||
// refactor me
|
||||
export const selectShowMatureContent = makeSelectClientSetting(SETTINGS.SHOW_MATURE);
|
||||
export const selectShowAnonymousContent = makeSelectClientSetting(SETTINGS.SHOW_ANONYMOUS);
|
||||
|
||||
export const selectTheme = makeSelectClientSetting(SETTINGS.THEME);
|
||||
export const selectAutomaticDarkModeEnabled = makeSelectClientSetting(SETTINGS.AUTOMATIC_DARK_MODE_ENABLED);
|
||||
|
|
Loading…
Reference in a new issue