mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-17 10:21:33 +03:00
hiding muted user's comments
This commit is contained in:
parent
505fccd458
commit
edbcc4f1d6
@ -17,7 +17,7 @@ import { TextWithIcon } from '../../basicUIElements';
|
||||
|
||||
// Styles
|
||||
import styles from './commentStyles';
|
||||
import Animated from 'react-native-reanimated';
|
||||
import { useAppSelector } from '../../../hooks';
|
||||
|
||||
const CommentView = ({
|
||||
avatarSize,
|
||||
@ -41,12 +41,16 @@ const CommentView = ({
|
||||
hideManyCommentsButton,
|
||||
openReplyThread,
|
||||
}) => {
|
||||
const intl = useIntl();
|
||||
const actionSheet = useRef(null);
|
||||
|
||||
const isMuted = useAppSelector(state => state.account.currentAccount.mutes?.indexOf(comment.author) > -1);
|
||||
|
||||
const [_isShowSubComments, setIsShowSubComments] = useState(isShowSubComments || false);
|
||||
const [isPressedShowButton, setIsPressedShowButton] = useState(false);
|
||||
const [activeVotes, setActiveVotes] = useState([]);
|
||||
|
||||
const intl = useIntl();
|
||||
const actionSheet = useRef(null);
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
if (comment) {
|
||||
@ -119,6 +123,7 @@ const CommentView = ({
|
||||
body={comment.body}
|
||||
created={comment.created}
|
||||
key={`key-${comment.permlink}`}
|
||||
isMuted={isMuted}
|
||||
/>
|
||||
|
||||
<Fragment>
|
||||
|
@ -38,6 +38,7 @@ const CommentBody = ({
|
||||
commentDepth,
|
||||
reputation,
|
||||
dispatch,
|
||||
isMuted
|
||||
}) => {
|
||||
|
||||
const _contentWidth = WIDTH - (40 + 28 + (commentDepth > 2 ? 44 : 0))
|
||||
@ -46,7 +47,7 @@ const CommentBody = ({
|
||||
const [postImages, setPostImages] = useState<string[]>([]);
|
||||
const [selectedImage, setSelectedImage] = useState(null);
|
||||
const [selectedLink, setSelectedLink] = useState(null);
|
||||
const [revealComment, setRevealComment] = useState(reputation > 0);
|
||||
const [revealComment, setRevealComment] = useState(reputation > 0 && !isMuted);
|
||||
const [videoUrl, setVideoUrl] = useState(null);
|
||||
const [youtubeVideoId, setYoutubeVideoId] = useState(null)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user