From 18c3bbe6e39036c20f5a3a4c451f081db3ce3fe0 Mon Sep 17 00:00:00 2001 From: jessopb <36554050+jessopb@users.noreply.github.com> Date: Fri, 21 Jan 2022 12:54:43 -0500 Subject: [PATCH] Fix comment disabling on MD (#685) (#7431) Also restore reactions This is only an internal tag Co-authored-by: Thomas Zarebczan --- ui/component/fileActions/index.js | 9 +-------- ui/component/fileActions/view.jsx | 4 +--- ui/page/file/view.jsx | 2 +- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/ui/component/fileActions/index.js b/ui/component/fileActions/index.js index a7dfda1e1..4a5426d7d 100644 --- a/ui/component/fileActions/index.js +++ b/ui/component/fileActions/index.js @@ -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), }; }; diff --git a/ui/component/fileActions/view.jsx b/ui/component/fileActions/view.jsx index f0e1778c5..c7f3c6724 100644 --- a/ui/component/fileActions/view.jsx +++ b/ui/component/fileActions/view.jsx @@ -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 && } + {ENABLE_FILE_REACTIONS && } {!hideRepost && } diff --git a/ui/page/file/view.jsx b/ui/page/file/view.jsx index 10df5fce0..6d708d66e 100644 --- a/ui/page/file/view.jsx +++ b/ui/page/file/view.jsx @@ -196,7 +196,7 @@ function FilePage(props: Props) { {!collection && !isMarkdown && !videoTheaterMode && } {isMarkdown && (
- + {!commentsDisabled && }
)}