diff options
author | Eric Bailey <git@esb.lol> | 2024-08-02 13:05:33 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-02 13:05:33 -0500 |
commit | c3d8beee6dc141ced2c41795f90b3309a2bc75a2 (patch) | |
tree | e2aa55a6e79616ec989b7426e2c46b4cd56b91e2 /src/components/moderation/ScreenHider.tsx | |
parent | 293ac6fab21f26baa8347c998f3a50224112c7c5 (diff) | |
download | voidsky-c3d8beee6dc141ced2c41795f90b3309a2bc75a2.tar.zst |
Respect labels on feeds and lists (#4818)
* Prep * Pass in optional moderation to FeedCard * Compute moderation decision, filter contentList contexts, pass into card * Let's go a different route * Filter from within search queries * Use same search query for starter packs * Filter lists from profile tabs * Cleanup * Filter from profile feeds * Moderate post embeds * Memoize * Use ScreenHider on lists * Hide both list types * Fix crash on iOS in screen hider, fix lineheight * Memoize renderItem * Reuse objects to prevent re-renders
Diffstat (limited to 'src/components/moderation/ScreenHider.tsx')
-rw-r--r-- | src/components/moderation/ScreenHider.tsx | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/src/components/moderation/ScreenHider.tsx b/src/components/moderation/ScreenHider.tsx index 0d316bc88..f855d6333 100644 --- a/src/components/moderation/ScreenHider.tsx +++ b/src/components/moderation/ScreenHider.tsx @@ -14,7 +14,7 @@ import {useModerationCauseDescription} from '#/lib/moderation/useModerationCause import {useWebMediaQueries} from 'lib/hooks/useWebMediaQueries' import {NavigationProp} from 'lib/routes/types' import {CenteredView} from '#/view/com/util/Views' -import {atoms as a, useTheme} from '#/alf' +import {atoms as a, useTheme, web} from '#/alf' import {Button, ButtonText} from '#/components/Button' import { ModerationDetailsDialog, @@ -105,6 +105,7 @@ export function ScreenHider({ a.mb_md, a.px_lg, a.text_center, + a.leading_snug, t.atoms.text_contrast_medium, ]}> {isNoPwi ? ( @@ -113,8 +114,15 @@ export function ScreenHider({ </Trans> ) : ( <> - <Trans>This {screenDescription} has been flagged:</Trans> - <Text style={[a.text_lg, a.font_semibold, t.atoms.text, a.ml_xs]}> + <Trans>This {screenDescription} has been flagged:</Trans>{' '} + <Text + style={[ + a.text_lg, + a.font_semibold, + a.leading_snug, + t.atoms.text, + a.ml_xs, + ]}> {desc.name}.{' '} </Text> <TouchableWithoutFeedback @@ -127,16 +135,17 @@ export function ScreenHider({ <Text style={[ a.text_lg, + a.leading_snug, { color: t.palette.primary_500, - // @ts-ignore web only -prf - cursor: 'pointer', }, + web({ + cursor: 'pointer', + }), ]}> <Trans>Learn More</Trans> </Text> </TouchableWithoutFeedback> - <ModerationDetailsDialog control={control} modcause={blur} /> </> )}{' '} |