Interpret 'hide' setting as ALWAYS hiding from thread replies (#4263)
parent
5fe1e171f0
commit
e48f8e15eb
|
@ -23,6 +23,7 @@ interface Props extends ComponentProps<typeof Link> {
|
||||||
iconStyles: StyleProp<ViewStyle>
|
iconStyles: StyleProp<ViewStyle>
|
||||||
modui: ModerationUI
|
modui: ModerationUI
|
||||||
profile: AppBskyActorDefs.ProfileViewBasic
|
profile: AppBskyActorDefs.ProfileViewBasic
|
||||||
|
interpretFilterAsBlur?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export function PostHider({
|
export function PostHider({
|
||||||
|
@ -35,6 +36,7 @@ export function PostHider({
|
||||||
iconSize,
|
iconSize,
|
||||||
iconStyles,
|
iconStyles,
|
||||||
profile,
|
profile,
|
||||||
|
interpretFilterAsBlur,
|
||||||
...props
|
...props
|
||||||
}: Props) {
|
}: Props) {
|
||||||
const queryClient = useQueryClient()
|
const queryClient = useQueryClient()
|
||||||
|
@ -42,7 +44,8 @@ export function PostHider({
|
||||||
const {_} = useLingui()
|
const {_} = useLingui()
|
||||||
const [override, setOverride] = React.useState(false)
|
const [override, setOverride] = React.useState(false)
|
||||||
const control = useModerationDetailsDialogControl()
|
const control = useModerationDetailsDialogControl()
|
||||||
const blur = modui.blurs[0]
|
const blur =
|
||||||
|
modui.blurs[0] || (interpretFilterAsBlur ? modui.filters[0] : undefined)
|
||||||
const desc = useModerationCauseDescription(blur)
|
const desc = useModerationCauseDescription(blur)
|
||||||
|
|
||||||
const onBeforePress = React.useCallback(() => {
|
const onBeforePress = React.useCallback(() => {
|
||||||
|
|
|
@ -543,9 +543,9 @@ function* flattenThreadReplies(
|
||||||
// handle blurred items
|
// handle blurred items
|
||||||
if (node.ctx.depth > 0) {
|
if (node.ctx.depth > 0) {
|
||||||
const modui = modCache.get(node)?.ui('contentList')
|
const modui = modCache.get(node)?.ui('contentList')
|
||||||
if (modui?.blur) {
|
if (modui?.blur || modui?.filter) {
|
||||||
if (!showHiddenReplies || node.ctx.depth > 1) {
|
if (!showHiddenReplies || node.ctx.depth > 1) {
|
||||||
if (modui.blurs[0].type === 'muted') {
|
if ((modui.blurs[0] || modui.filters[0]).type === 'muted') {
|
||||||
return HiddenReplyType.Muted
|
return HiddenReplyType.Muted
|
||||||
}
|
}
|
||||||
return HiddenReplyType.Hidden
|
return HiddenReplyType.Hidden
|
||||||
|
|
|
@ -430,7 +430,8 @@ let PostThreadItemLoaded = ({
|
||||||
? {marginRight: 4}
|
? {marginRight: 4}
|
||||||
: {marginLeft: 2, marginRight: 2}
|
: {marginLeft: 2, marginRight: 2}
|
||||||
}
|
}
|
||||||
profile={post.author}>
|
profile={post.author}
|
||||||
|
interpretFilterAsBlur>
|
||||||
<View
|
<View
|
||||||
style={{
|
style={{
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
|
|
Loading…
Reference in New Issue