Fix comment disabling on MD (#685) (#7431)

Also restore reactions
This is only an internal tag

Co-authored-by: Thomas Zarebczan <tzarebczan@users.noreply.github.com>
This commit is contained in:
jessopb 2022-01-21 12:54:43 -05:00 committed by GitHub
parent fc3ddf01b1
commit 18c3bbe6e3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 12 deletions

View file

@ -1,13 +1,7 @@
import { connect } from 'react-redux';
import {
selectClaimIsMine,
selectClaimForUri,
selectHasChannels,
makeSelectTagInClaimOrChannelForUri,
} from 'redux/selectors/claims';
import { selectClaimIsMine, selectClaimForUri, selectHasChannels } from 'redux/selectors/claims';
import { makeSelectStreamingUrlForUri, makeSelectFileInfoForUri } from 'redux/selectors/file_info';
import { doPrepareEdit } from 'redux/actions/publish';
import { DISABLE_COMMENTS_TAG } from 'constants/tags';
import { selectCostInfoForUri } from 'lbryinc';
import { doSetPlayingUri, doPlayUri } from 'redux/actions/content';
import { doToast } from 'redux/actions/notifications';
@ -26,7 +20,6 @@ const select = (state, props) => {
renderMode: makeSelectFileRenderModeForUri(props.uri)(state),
costInfo: selectCostInfoForUri(state, props.uri),
hasChannels: selectHasChannels(state),
reactionsDisabled: makeSelectTagInClaimOrChannelForUri(props.uri, DISABLE_COMMENTS_TAG)(state),
streamingUrl: makeSelectStreamingUrlForUri(props.uri)(state),
};
};

View file

@ -29,7 +29,6 @@ type Props = {
renderMode: string,
hasChannels: boolean,
hideRepost?: boolean,
reactionsDisabled: boolean,
download: (string) => void,
streamingUrl: ?string,
};
@ -46,7 +45,6 @@ function FileActions(props: Props) {
prepareEdit,
hasChannels,
hideRepost,
reactionsDisabled,
} = props;
const {
push,
@ -80,7 +78,7 @@ function FileActions(props: Props) {
const lhsSection = (
<>
{ENABLE_FILE_REACTIONS && !reactionsDisabled && <FileReactions uri={uri} />}
{ENABLE_FILE_REACTIONS && <FileReactions uri={uri} />}
<ClaimSupportButton uri={uri} fileAction />
<ClaimCollectionAddButton uri={uri} fileAction />
{!hideRepost && <ClaimRepostButton uri={uri} claim={claim} hasChannels={hasChannels} />}

View file

@ -196,7 +196,7 @@ function FilePage(props: Props) {
{!collection && !isMarkdown && !videoTheaterMode && <RecommendedContent uri={uri} />}
{isMarkdown && (
<div className="file-page__post-comments">
<CommentsList uri={uri} linkedCommentId={linkedCommentId} commentsAreExpanded />
{!commentsDisabled && <CommentsList uri={uri} linkedCommentId={linkedCommentId} commentsAreExpanded />}
</div>
)}
</Page>