From e5831083acd5919746db857896783b34dfa30208 Mon Sep 17 00:00:00 2001 From: Sadaqat Ali Date: Sun, 13 Mar 2022 22:41:34 +0500 Subject: [PATCH] hide delete button if comment is not deleteable --- src/components/comment/view/commentView.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/comment/view/commentView.tsx b/src/components/comment/view/commentView.tsx index b4e136efd..f15fd35dd 100644 --- a/src/components/comment/view/commentView.tsx +++ b/src/components/comment/view/commentView.tsx @@ -233,7 +233,7 @@ const CommentView = ({ onPress={() => handleOnEditPress && handleOnEditPress(comment)} iconType="MaterialIcons" /> - {!childCount && !activeVotes.length && ( + {!childCount && !activeVotes.length && isCommentDeletable && ( 2 ? {marginLeft: 44}:null - + const isCommentDeletable = comment && !(comment.children > 0 || comment.net_rshares > 0 || comment.is_paidout); + return (