Apply avatar moderation to quote post (#7229)

This commit is contained in:
Christian Schmidt
2024-12-21 00:15:45 +01:00
committed by GitHub
parent 3aa1a5f884
commit fa2072cefa
2 changed files with 2 additions and 4 deletions
@@ -567,7 +567,6 @@ let PostThreadItemLoaded = ({
timestamp={post.indexedAt} timestamp={post.indexedAt}
postHref={postHref} postHref={postHref}
showAvatar={isThreadedChild} showAvatar={isThreadedChild}
avatarModeration={moderation.ui('avatar')}
avatarSize={24} avatarSize={24}
style={[a.pb_xs]} style={[a.pb_xs]}
/> />
+2 -3
View File
@@ -1,6 +1,6 @@
import React, {memo, useCallback} from 'react' import React, {memo, useCallback} from 'react'
import {StyleProp, View, ViewStyle} from 'react-native' import {StyleProp, View, ViewStyle} from 'react-native'
import {AppBskyActorDefs, ModerationDecision, ModerationUI} from '@atproto/api' import {AppBskyActorDefs, ModerationDecision} from '@atproto/api'
import {msg} from '@lingui/macro' import {msg} from '@lingui/macro'
import {useLingui} from '@lingui/react' import {useLingui} from '@lingui/react'
import {useQueryClient} from '@tanstack/react-query' import {useQueryClient} from '@tanstack/react-query'
@@ -26,7 +26,6 @@ interface PostMetaOpts {
postHref: string postHref: string
timestamp: string timestamp: string
showAvatar?: boolean showAvatar?: boolean
avatarModeration?: ModerationUI
avatarSize?: number avatarSize?: number
onOpenAuthor?: () => void onOpenAuthor?: () => void
style?: StyleProp<ViewStyle> style?: StyleProp<ViewStyle>
@@ -67,7 +66,7 @@ let PostMeta = (opts: PostMetaOpts): React.ReactNode => {
<PreviewableUserAvatar <PreviewableUserAvatar
size={opts.avatarSize || 16} size={opts.avatarSize || 16}
profile={opts.author} profile={opts.author}
moderation={opts.avatarModeration} moderation={opts.moderation?.ui('avatar')}
type={opts.author.associated?.labeler ? 'labeler' : 'user'} type={opts.author.associated?.labeler ? 'labeler' : 'user'}
/> />
</View> </View>