Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Optimize ContentHider (#6501)

authored by

dan and committed by
GitHub
924f1e0e 0b38c77f

+31 -9
+31 -9
src/components/moderation/ContentHider.tsx
··· 32 32 style?: StyleProp<ViewStyle> 33 33 childContainerStyle?: StyleProp<ViewStyle> 34 34 }>) { 35 + const blur = modui?.blurs[0] 36 + if (!blur || (ignoreMute && isJustAMute(modui))) { 37 + return ( 38 + <View testID={testID} style={style}> 39 + {children} 40 + </View> 41 + ) 42 + } 43 + return ( 44 + <ContentHiderActive 45 + testID={testID} 46 + modui={modui} 47 + style={style} 48 + childContainerStyle={childContainerStyle}> 49 + {children} 50 + </ContentHiderActive> 51 + ) 52 + } 53 + 54 + function ContentHiderActive({ 55 + testID, 56 + modui, 57 + style, 58 + childContainerStyle, 59 + children, 60 + }: React.PropsWithChildren<{ 61 + testID?: string 62 + modui: ModerationUI 63 + style?: StyleProp<ViewStyle> 64 + childContainerStyle?: StyleProp<ViewStyle> 65 + }>) { 35 66 const t = useTheme() 36 67 const {_} = useLingui() 37 68 const {gtMobile} = useBreakpoints() ··· 40 71 const {labelDefs} = useLabelDefinitions() 41 72 const globalLabelStrings = useGlobalLabelStrings() 42 73 const {i18n} = useLingui() 43 - 44 74 const blur = modui?.blurs[0] 45 75 const desc = useModerationCauseDescription(blur) 46 76 ··· 98 128 i18n.locale, 99 129 globalLabelStrings, 100 130 ]) 101 - 102 - if (!blur || (ignoreMute && isJustAMute(modui))) { 103 - return ( 104 - <View testID={testID} style={style}> 105 - {children} 106 - </View> 107 - ) 108 - } 109 131 110 132 return ( 111 133 <View testID={testID} style={[a.overflow_hidden, style]}>