Only blur titles for list blur
This commit is contained in:
@@ -59,6 +59,8 @@ export function VideoPostCard({
|
|||||||
onOut: onPressOut,
|
onOut: onPressOut,
|
||||||
} = useInteractionState()
|
} = useInteractionState()
|
||||||
|
|
||||||
|
const listModUi = moderation.ui('contentList')
|
||||||
|
|
||||||
const mergedModui = useMemo(() => {
|
const mergedModui = useMemo(() => {
|
||||||
const modui = moderation.ui('contentList')
|
const modui = moderation.ui('contentList')
|
||||||
const mediaModui = moderation.ui('contentMedia')
|
const mediaModui = moderation.ui('contentMedia')
|
||||||
@@ -82,6 +84,32 @@ export function VideoPostCard({
|
|||||||
const {thumbnail} = embed
|
const {thumbnail} = embed
|
||||||
const black = getBlackColor(t)
|
const black = getBlackColor(t)
|
||||||
|
|
||||||
|
const textAndAuthor = (
|
||||||
|
<View style={[a.pr_xs, {paddingTop: 6, gap: 4}]}>
|
||||||
|
{text && (
|
||||||
|
<Text style={[a.text_md, a.leading_snug]} numberOfLines={2} emoji>
|
||||||
|
{text}
|
||||||
|
</Text>
|
||||||
|
)}
|
||||||
|
<View style={[a.flex_row, a.gap_xs, a.align_center]}>
|
||||||
|
<View style={[a.relative, a.rounded_full, {width: 20, height: 20}]}>
|
||||||
|
<UserAvatar type="user" size={20} avatar={post.author.avatar} />
|
||||||
|
<MediaInsetBorder />
|
||||||
|
</View>
|
||||||
|
<Text
|
||||||
|
style={[
|
||||||
|
a.flex_1,
|
||||||
|
a.text_sm,
|
||||||
|
a.leading_tight,
|
||||||
|
t.atoms.text_contrast_medium,
|
||||||
|
]}
|
||||||
|
numberOfLines={1}>
|
||||||
|
{sanitizeHandle(post.author.handle, '@')}
|
||||||
|
</Text>
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Link
|
<Link
|
||||||
accessibilityHint={_(msg`Tap to view video in immersive mode.`)}
|
accessibilityHint={_(msg`Tap to view video in immersive mode.`)}
|
||||||
@@ -146,7 +174,11 @@ export function VideoPostCard({
|
|||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
<VideoPostCardTextPlaceholder author={post.author} />
|
{listModUi.blur ? (
|
||||||
|
<VideoPostCardTextPlaceholder author={post.author} />
|
||||||
|
) : (
|
||||||
|
textAndAuthor
|
||||||
|
)}
|
||||||
</Hider.Mask>
|
</Hider.Mask>
|
||||||
<Hider.Content>
|
<Hider.Content>
|
||||||
<View
|
<View
|
||||||
@@ -206,30 +238,7 @@ export function VideoPostCard({
|
|||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
<View style={[a.pr_xs, {paddingTop: 6, gap: 4}]}>
|
{textAndAuthor}
|
||||||
{text && (
|
|
||||||
<Text style={[a.text_md, a.leading_snug]} numberOfLines={2} emoji>
|
|
||||||
{text}
|
|
||||||
</Text>
|
|
||||||
)}
|
|
||||||
<View style={[a.flex_row, a.gap_xs, a.align_center]}>
|
|
||||||
<View
|
|
||||||
style={[a.relative, a.rounded_full, {width: 20, height: 20}]}>
|
|
||||||
<UserAvatar type="user" size={20} avatar={post.author.avatar} />
|
|
||||||
<MediaInsetBorder />
|
|
||||||
</View>
|
|
||||||
<Text
|
|
||||||
style={[
|
|
||||||
a.flex_1,
|
|
||||||
a.text_sm,
|
|
||||||
a.leading_tight,
|
|
||||||
t.atoms.text_contrast_medium,
|
|
||||||
]}
|
|
||||||
numberOfLines={1}>
|
|
||||||
{sanitizeHandle(post.author.handle, '@')}
|
|
||||||
</Text>
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
</Hider.Content>
|
</Hider.Content>
|
||||||
</Hider.Outer>
|
</Hider.Outer>
|
||||||
</Link>
|
</Link>
|
||||||
|
|||||||
Reference in New Issue
Block a user