Fix comment disabling on MD (#685)
Also restore reactions This is only an internal tag
This commit is contained in:
parent
2575c5d448
commit
9e70629ada
3 changed files with 2 additions and 7 deletions
|
@ -4,11 +4,9 @@ import {
|
||||||
selectClaimForUri,
|
selectClaimForUri,
|
||||||
selectHasChannels,
|
selectHasChannels,
|
||||||
selectIsStreamPlaceholderForUri,
|
selectIsStreamPlaceholderForUri,
|
||||||
makeSelectTagInClaimOrChannelForUri,
|
|
||||||
} from 'redux/selectors/claims';
|
} from 'redux/selectors/claims';
|
||||||
import { makeSelectStreamingUrlForUri, makeSelectFileInfoForUri } from 'redux/selectors/file_info';
|
import { makeSelectStreamingUrlForUri, makeSelectFileInfoForUri } from 'redux/selectors/file_info';
|
||||||
import { doPrepareEdit } from 'redux/actions/publish';
|
import { doPrepareEdit } from 'redux/actions/publish';
|
||||||
import { DISABLE_COMMENTS_TAG } from 'constants/tags';
|
|
||||||
import { selectCostInfoForUri } from 'lbryinc';
|
import { selectCostInfoForUri } from 'lbryinc';
|
||||||
import { doSetPlayingUri, doPlayUri } from 'redux/actions/content';
|
import { doSetPlayingUri, doPlayUri } from 'redux/actions/content';
|
||||||
import { doToast } from 'redux/actions/notifications';
|
import { doToast } from 'redux/actions/notifications';
|
||||||
|
@ -28,7 +26,6 @@ const select = (state, props) => {
|
||||||
costInfo: selectCostInfoForUri(state, props.uri),
|
costInfo: selectCostInfoForUri(state, props.uri),
|
||||||
hasChannels: selectHasChannels(state),
|
hasChannels: selectHasChannels(state),
|
||||||
isLivestreamClaim: selectIsStreamPlaceholderForUri(state, props.uri),
|
isLivestreamClaim: selectIsStreamPlaceholderForUri(state, props.uri),
|
||||||
reactionsDisabled: makeSelectTagInClaimOrChannelForUri(props.uri, DISABLE_COMMENTS_TAG)(state),
|
|
||||||
streamingUrl: makeSelectStreamingUrlForUri(props.uri)(state),
|
streamingUrl: makeSelectStreamingUrlForUri(props.uri)(state),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -32,7 +32,6 @@ type Props = {
|
||||||
clearPlayingUri: () => void,
|
clearPlayingUri: () => void,
|
||||||
hideRepost?: boolean,
|
hideRepost?: boolean,
|
||||||
isLivestreamClaim: boolean,
|
isLivestreamClaim: boolean,
|
||||||
reactionsDisabled: boolean,
|
|
||||||
download: (string) => void,
|
download: (string) => void,
|
||||||
streamingUrl: ?string,
|
streamingUrl: ?string,
|
||||||
};
|
};
|
||||||
|
@ -52,7 +51,6 @@ function FileActions(props: Props) {
|
||||||
doToast,
|
doToast,
|
||||||
hideRepost,
|
hideRepost,
|
||||||
isLivestreamClaim,
|
isLivestreamClaim,
|
||||||
reactionsDisabled,
|
|
||||||
download,
|
download,
|
||||||
streamingUrl,
|
streamingUrl,
|
||||||
} = props;
|
} = props;
|
||||||
|
@ -116,7 +114,7 @@ function FileActions(props: Props) {
|
||||||
|
|
||||||
const lhsSection = (
|
const lhsSection = (
|
||||||
<>
|
<>
|
||||||
{ENABLE_FILE_REACTIONS && !reactionsDisabled && <FileReactions uri={uri} livestream={isLivestreamClaim} />}
|
{ENABLE_FILE_REACTIONS && <FileReactions uri={uri} livestream={isLivestreamClaim} />}
|
||||||
<ClaimSupportButton uri={uri} fileAction />
|
<ClaimSupportButton uri={uri} fileAction />
|
||||||
<ClaimCollectionAddButton uri={uri} fileAction />
|
<ClaimCollectionAddButton uri={uri} fileAction />
|
||||||
{!hideRepost && (
|
{!hideRepost && (
|
||||||
|
|
|
@ -223,7 +223,7 @@ function FilePage(props: Props) {
|
||||||
{isMarkdown && (
|
{isMarkdown && (
|
||||||
<div className="file-page__post-comments">
|
<div className="file-page__post-comments">
|
||||||
<React.Suspense fallback={null}>
|
<React.Suspense fallback={null}>
|
||||||
<CommentsList uri={uri} linkedCommentId={linkedCommentId} commentsAreExpanded />
|
{!commentsDisabled && <CommentsList uri={uri} linkedCommentId={linkedCommentId} commentsAreExpanded />}
|
||||||
</React.Suspense>
|
</React.Suspense>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
Loading…
Reference in a new issue