Comment: add hideContextMenu + hide reply button too when hideActions is set

This commit is contained in:
infinite-persistence 2022-07-12 14:02:27 +08:00 committed by infinite-persistence
parent 8aa6a60acf
commit ed0fb59983

View file

@ -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,6 +333,7 @@ function CommentView(props: Props) {
</span>
)}
</div>
{!hideContextMenu && (
<div className="comment__menu">
<Menu>
<MenuButton className="menu__button">
@ -349,6 +352,7 @@ function CommentView(props: Props) {
/>
</Menu>
</div>
)}
</div>
<div>
{isEditing ? (
@ -417,7 +421,8 @@ function CommentView(props: Props) {
<Spinner text={numDirectReplies > 1 ? __('Loading Replies') : __('Loading Reply')} type="small" />
</span>
) : (
numDirectReplies > 0 && (
numDirectReplies > 0 &&
!hideActions && (
<div className="comment__actions">
{!showReplies ? (
openNewThread ? (