diff options
author | Samuel Newman <mozzius@protonmail.com> | 2025-06-06 13:08:45 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-06-06 03:08:45 -0700 |
commit | 40f97d05a60e1d438eaf5c46eef7f34f990b3907 (patch) | |
tree | 043e33951f69270e388dba8bfd70b3053f338d11 | |
parent | 442de4ab7ae210fb0fa857e2d5783207288bbe99 (diff) | |
download | voidsky-40f97d05a60e1d438eaf5c46eef7f34f990b3907.tar.zst |
show misclass button by the same logic as feedContext (#8445)
-rw-r--r-- | src/components/PostControls/PostMenu/PostMenuItems.tsx | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/src/components/PostControls/PostMenu/PostMenuItems.tsx b/src/components/PostControls/PostMenu/PostMenuItems.tsx index 969a3eca6..7f33f3348 100644 --- a/src/components/PostControls/PostMenu/PostMenuItems.tsx +++ b/src/components/PostControls/PostMenu/PostMenuItems.tsx @@ -26,7 +26,7 @@ import { type CommonNavigatorParams, type NavigationProp, } from '#/lib/routes/types' -import {logEvent} from '#/lib/statsig/statsig' +import {logEvent, useGate} from '#/lib/statsig/statsig' import {richTextToString} from '#/lib/strings/rich-text-helpers' import {toShareUrl} from '#/lib/strings/url-helpers' import {getTranslatorLink} from '#/locale/helpers' @@ -397,6 +397,12 @@ let PostMenuItems = ({ openLink(url) } + const gate = useGate() + const isDiscoverDebugUser = + IS_INTERNAL || + DISCOVER_DEBUG_DIDS[currentAccount?.did || ''] || + gate('debug_show_feedcontext') + return ( <> <Menu.Outer> @@ -472,17 +478,15 @@ let PostMenuItems = ({ </> )} - {hasSession && - IS_INTERNAL && - DISCOVER_DEBUG_DIDS[currentAccount?.did ?? ''] && ( - <Menu.Item - testID="postDropdownReportMisclassificationBtn" - label={_(msg`Assign topic for algo`)} - onPress={onReportMisclassification}> - <Menu.ItemText>{_(msg`Assign topic for algo`)}</Menu.ItemText> - <Menu.ItemIcon icon={AtomIcon} position="right" /> - </Menu.Item> - )} + {isDiscoverDebugUser && ( + <Menu.Item + testID="postDropdownReportMisclassificationBtn" + label={_(msg`Assign topic for algo`)} + onPress={onReportMisclassification}> + <Menu.ItemText>{_(msg`Assign topic for algo`)}</Menu.ItemText> + <Menu.ItemIcon icon={AtomIcon} position="right" /> + </Menu.Item> + )} {hasSession && ( <> |