diff --git a/.env.defaults b/.env.defaults
index 0c56b8598..4896e87d9 100644
--- a/.env.defaults
+++ b/.env.defaults
@@ -30,6 +30,7 @@ YRBL_SAD_IMG_URL=https://cdn.lbryplayer.xyz/api/v3/streams/free/yrbl-sad/c2d9649
ENABLE_COMMENT_REACTIONS=true
ENABLE_FILE_REACTIONS=false
ENABLE_CREATOR_REACTIONS=false
+CHANNEL_STAKED_LEVEL_VIDEO_COMMENTS=4
# OG
OG_TITLE_SUFFIX=| lbry.tv
diff --git a/config.js b/config.js
index ab36896fa..77041bdc8 100644
--- a/config.js
+++ b/config.js
@@ -35,6 +35,7 @@ const config = {
ENABLE_COMMENT_REACTIONS: process.env.ENABLE_COMMENT_REACTIONS === 'true',
ENABLE_FILE_REACTIONS: process.env.ENABLE_FILE_REACTIONS === 'true',
ENABLE_CREATOR_REACTIONS: process.env.ENABLE_CREATOR_REACTIONS === 'true',
+ CHANNEL_STAKED_LEVEL_VIDEO_COMMENTS: process.env.CHANNEL_STAKED_LEVEL_VIDEO_COMMENTS,
SIMPLE_SITE: process.env.SIMPLE_SITE === 'true',
SHOW_ADS: process.env.SHOW_ADS === 'true',
PINNED_URI_1: process.env.PINNED_URI_1,
diff --git a/ui/component/comment/index.js b/ui/component/comment/index.js
index 40766512e..315d5188f 100644
--- a/ui/component/comment/index.js
+++ b/ui/component/comment/index.js
@@ -1,5 +1,5 @@
import { connect } from 'react-redux';
-import { makeSelectThumbnailForUri, selectMyChannelClaims } from 'lbry-redux';
+import { makeSelectStakedLevelForChannelUri, makeSelectThumbnailForUri, selectMyChannelClaims } from 'lbry-redux';
import { doCommentUpdate } from 'redux/actions/comments';
import { makeSelectChannelIsMuted } from 'redux/selectors/blocked';
import { doToast } from 'redux/actions/notifications';
@@ -18,6 +18,7 @@ const select = (state, props) => ({
activeChannelClaim: selectActiveChannelClaim(state),
myChannels: selectMyChannelClaims(state),
playingUri: selectPlayingUri(state),
+ stakedLevel: makeSelectStakedLevelForChannelUri(props.authorUri)(state),
});
const perform = (dispatch) => ({
diff --git a/ui/component/comment/view.jsx b/ui/component/comment/view.jsx
index a01f44890..814016b58 100644
--- a/ui/component/comment/view.jsx
+++ b/ui/component/comment/view.jsx
@@ -49,6 +49,7 @@ type Props = {
commentIdentityChannel: any,
activeChannelClaim: ?ChannelClaim,
playingUri: ?PlayingUri,
+ stakedLevel: number,
};
const LENGTH_TO_COLLAPSE = 300;
@@ -75,6 +76,7 @@ function Comment(props: Props) {
isPinned,
othersReacts,
playingUri,
+ stakedLevel,
} = props;
const {
push,
@@ -254,10 +256,20 @@ function Comment(props: Props) {
) : editedMessage.length >= LENGTH_TO_COLLAPSE ? (
-
+
) : (
-
+
)}
diff --git a/ui/component/common/markdown-preview.jsx b/ui/component/common/markdown-preview.jsx
index 1242624d5..192b5ec3a 100644
--- a/ui/component/common/markdown-preview.jsx
+++ b/ui/component/common/markdown-preview.jsx
@@ -13,6 +13,7 @@ import defaultSchema from 'hast-util-sanitize/lib/github.json';
import { formatedLinks, inlineLinks } from 'util/remark-lbry';
import { formattedTimestamp, inlineTimestamp } from 'util/remark-timestamp';
import ZoomableImage from 'component/zoomableImage';
+import { CHANNEL_STAKED_LEVEL_VIDEO_COMMENTS } from 'config';
type SimpleTextProps = {
children?: React.Node,
@@ -32,6 +33,7 @@ type MarkdownProps = {
className?: string,
parentCommentId?: string,
isMarkdownPost?: boolean,
+ stakedLevel?: number,
};
// ****************************************************************************
@@ -93,7 +95,7 @@ const REPLACE_REGEX = /(