fix list padding not being pressable

This commit is contained in:
Samuel Newman
2025-07-08 12:30:39 +03:00
parent c9fc9a4298
commit 40a6b56506
2 changed files with 14 additions and 11 deletions
+7 -5
View File
@@ -1,10 +1,10 @@
import React from 'react'
import {View} from 'react-native'
import {
AppBskyGraphDefs,
type AppBskyGraphDefs,
AtUri,
moderateUserList,
ModerationUI,
type ModerationUI,
} from '@atproto/api'
import {msg, Trans} from '@lingui/macro'
import {useLingui} from '@lingui/react'
@@ -22,10 +22,10 @@ import {
Outer,
SaveButton,
} from '#/components/FeedCard'
import {Link as InternalLink, LinkProps} from '#/components/Link'
import {Link as InternalLink, type LinkProps} from '#/components/Link'
import * as Hider from '#/components/moderation/Hider'
import {Text} from '#/components/Typography'
import * as bsky from '#/types/bsky'
import type * as bsky from '#/types/bsky'
/*
* This component is based on `FeedCard` and is tightly coupled with that
@@ -50,7 +50,9 @@ type Props = {
showPinButton?: boolean
}
export function Default(props: Props) {
export function Default(
props: Props & Omit<LinkProps, 'to' | 'label' | 'children'>,
) {
const {view, showPinButton} = props
const moderationOpts = useModerationOpts()
const moderation = moderationOpts
+7 -6
View File
@@ -1,5 +1,4 @@
import React from 'react'
import {View} from 'react-native'
import {moderateUserList} from '@atproto/api'
import {useModerationOpts} from '#/state/preferences/moderation-opts'
@@ -16,10 +15,10 @@ export function ListEmbed({
}) {
const t = useTheme()
return (
<View
style={[a.border, t.atoms.border_contrast_medium, a.p_md, a.rounded_sm]}>
<ListCard.Default view={embed.view} />
</View>
<ListCard.Default
view={embed.view}
style={[a.border, t.atoms.border_contrast_medium, a.p_md, a.rounded_sm]}
/>
)
}
@@ -35,7 +34,9 @@ export function ModeratedListEmbed({
: undefined
}, [embed.view, moderationOpts])
return (
<ContentHider modui={moderation?.ui('contentList')}>
<ContentHider
modui={moderation?.ui('contentList')}
childContainerStyle={[a.pt_xs]}>
<ListEmbed embed={embed} />
</ContentHider>
)