From ed0fb59983c08c4b27a77d234df2f50af3f6374b Mon Sep 17 00:00:00 2001 From: infinite-persistence Date: Tue, 12 Jul 2022 14:02:27 +0800 Subject: [PATCH] Comment: add `hideContextMenu` + hide reply button too when `hideActions` is set --- ui/component/comment/view.jsx | 43 +++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/ui/component/comment/view.jsx b/ui/component/comment/view.jsx index 879384bd3..1995f2640 100644 --- a/ui/component/comment/view.jsx +++ b/ui/component/comment/view.jsx @@ -70,6 +70,7 @@ type Props = { doToast: ({ message: string }) => void, isTopLevel?: boolean, hideActions?: boolean, + hideContextMenu?: boolean, othersReacts: ?{ like: number, dislike: number, @@ -106,6 +107,7 @@ function CommentView(props: Props) { doToast, isTopLevel, hideActions, + hideContextMenu, othersReacts, playingUri, stakedLevel, @@ -331,24 +333,26 @@ function CommentView(props: Props) { )} -
- - - - - - -
+ {!hideContextMenu && ( +
+ + + + + + +
+ )}
{isEditing ? ( @@ -417,7 +421,8 @@ function CommentView(props: Props) { 1 ? __('Loading Replies') : __('Loading Reply')} type="small" /> ) : ( - numDirectReplies > 0 && ( + numDirectReplies > 0 && + !hideActions && (
{!showReplies ? ( openNewThread ? (