Merge pull request #2219 from ecency/sa/comment-delete-bug

Fix comment delete failure bug
This commit is contained in:
Feruz M 2022-03-13 20:28:27 +02:00 committed by GitHub
commit 9480df4104
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -233,7 +233,7 @@ const CommentView = ({
onPress={() => handleOnEditPress && handleOnEditPress(comment)}
iconType="MaterialIcons"
/>
{!childCount && !activeVotes.length && (
{!childCount && !activeVotes.length && isCommentDeletable && (
<Fragment>
<IconButton
size={20}
@ -283,6 +283,7 @@ const CommentView = ({
}
const customContainerStyle = commentNumber > 2 ? {marginLeft: 44}:null
const isCommentDeletable = comment && !(comment.children > 0 || comment.net_rshares > 0 || comment.is_paidout);
return (
<Fragment>