From b798eafaeedbfe76b004172ad59b16ae31b1fc00 Mon Sep 17 00:00:00 2001 From: Rudy Fraser Date: Fri, 26 Jun 2026 09:03:06 -0400 Subject: [PATCH] feat(community-posts): keep repost menu, disable just the Repost item Hiding the whole RepostButton on community posts also hid the Quote flow, which we still allow (replies + quotes of community posts route through community.blacksky.feed.submitPost). Add a repostDisabled prop to RepostButton (web menu item + native dialog button) and pass it true for community posts so the menu opens, Quote is enabled, and only Repost is greyed out with a 'Reposts disabled' label. --- src/components/PostControls/RepostButton.tsx | 36 +++++++++++++++---- .../PostControls/RepostButton.web.tsx | 19 ++++++---- src/components/PostControls/index.tsx | 19 +++++----- 3 files changed, 51 insertions(+), 23 deletions(-) diff --git a/src/components/PostControls/RepostButton.tsx b/src/components/PostControls/RepostButton.tsx index 734cafa3c..7da04c737 100644 --- a/src/components/PostControls/RepostButton.tsx +++ b/src/components/PostControls/RepostButton.tsx @@ -26,6 +26,7 @@ interface Props { onQuote: () => void big?: boolean embeddingDisabled: boolean + repostDisabled?: boolean } let RepostButton = ({ @@ -35,6 +36,7 @@ let RepostButton = ({ onQuote, big, embeddingDisabled, + repostDisabled, }: Props): React.ReactNode => { const t = useTheme() const {_} = useLingui() @@ -46,7 +48,7 @@ let RepostButton = ({ const onLongPress = () => requireAuth(() => { - if (embeddingDisabled) { + if (embeddingDisabled || repostDisabled) { dialogControl.open() } else { onQuote() @@ -101,6 +103,7 @@ let RepostButton = ({ onRepost={onRepost} onQuote={onQuote} embeddingDisabled={embeddingDisabled} + repostDisabled={repostDisabled} /> @@ -114,11 +117,13 @@ let RepostButtonDialogInner = ({ onRepost, onQuote, embeddingDisabled, + repostDisabled, }: { isReposted: boolean onRepost: () => void onQuote: () => void embeddingDisabled: boolean + repostDisabled?: boolean }): React.ReactNode => { const t = useTheme() const {_} = useLingui() @@ -147,19 +152,36 @@ let RepostButtonDialogInner = ({