fix quote padding not being pressable
This commit is contained in:
@@ -268,64 +268,60 @@ export function QuoteEmbed({
|
|||||||
const [hover, setHover] = React.useState(false)
|
const [hover, setHover] = React.useState(false)
|
||||||
return (
|
return (
|
||||||
<View
|
<View
|
||||||
onPointerEnter={() => {
|
style={[a.mt_sm]}
|
||||||
setHover(true)
|
onPointerEnter={() => setHover(true)}
|
||||||
}}
|
onPointerLeave={() => setHover(false)}>
|
||||||
onPointerLeave={() => {
|
|
||||||
setHover(false)
|
|
||||||
}}>
|
|
||||||
<ContentHider
|
<ContentHider
|
||||||
modui={moderation?.ui('contentList')}
|
modui={moderation?.ui('contentList')}
|
||||||
style={[
|
style={[a.rounded_md, a.border, t.atoms.border_contrast_low, style]}
|
||||||
a.rounded_md,
|
activeStyle={[a.p_md, a.pt_sm]}
|
||||||
a.p_md,
|
|
||||||
a.mt_sm,
|
|
||||||
a.border,
|
|
||||||
t.atoms.border_contrast_low,
|
|
||||||
style,
|
|
||||||
]}
|
|
||||||
childContainerStyle={[a.pt_sm]}>
|
childContainerStyle={[a.pt_sm]}>
|
||||||
<SubtleWebHover hover={hover} />
|
{({active}) => (
|
||||||
<Link
|
<>
|
||||||
hoverStyle={{borderColor: pal.colors.borderLinkHover}}
|
{!active && <SubtleWebHover hover={hover} style={[a.rounded_md]} />}
|
||||||
href={itemHref}
|
<Link
|
||||||
title={itemTitle}
|
style={[!active && a.p_md]}
|
||||||
onBeforePress={onBeforePress}>
|
hoverStyle={{borderColor: pal.colors.borderLinkHover}}
|
||||||
<View pointerEvents="none">
|
href={itemHref}
|
||||||
<PostMeta
|
title={itemTitle}
|
||||||
author={quote.author}
|
onBeforePress={onBeforePress}>
|
||||||
moderation={moderation}
|
<View pointerEvents="none">
|
||||||
showAvatar
|
<PostMeta
|
||||||
postHref={itemHref}
|
author={quote.author}
|
||||||
timestamp={quote.indexedAt}
|
moderation={moderation}
|
||||||
/>
|
showAvatar
|
||||||
</View>
|
postHref={itemHref}
|
||||||
{moderation ? (
|
timestamp={quote.indexedAt}
|
||||||
<PostAlerts
|
/>
|
||||||
modui={moderation.ui('contentView')}
|
</View>
|
||||||
style={[a.py_xs]}
|
{moderation ? (
|
||||||
/>
|
<PostAlerts
|
||||||
) : null}
|
modui={moderation.ui('contentView')}
|
||||||
{richText ? (
|
style={[a.py_xs]}
|
||||||
<RichText
|
/>
|
||||||
value={richText}
|
) : null}
|
||||||
style={a.text_md}
|
{richText ? (
|
||||||
numberOfLines={20}
|
<RichText
|
||||||
disableLinks
|
value={richText}
|
||||||
/>
|
style={a.text_md}
|
||||||
) : null}
|
numberOfLines={20}
|
||||||
{quote.embed && (
|
disableLinks
|
||||||
<Embed
|
/>
|
||||||
embed={quote.embed}
|
) : null}
|
||||||
moderation={moderation}
|
{quote.embed && (
|
||||||
isWithinQuote={parentIsWithinQuote ?? true}
|
<Embed
|
||||||
// already within quote? override nested
|
embed={quote.embed}
|
||||||
allowNestedQuotes={
|
moderation={moderation}
|
||||||
parentIsWithinQuote ? false : parentAllowNestedQuotes
|
isWithinQuote={parentIsWithinQuote ?? true}
|
||||||
}
|
// already within quote? override nested
|
||||||
/>
|
allowNestedQuotes={
|
||||||
)}
|
parentIsWithinQuote ? false : parentAllowNestedQuotes
|
||||||
</Link>
|
}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
</Link>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
</ContentHider>
|
</ContentHider>
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -23,20 +23,23 @@ export function ContentHider({
|
|||||||
modui,
|
modui,
|
||||||
ignoreMute,
|
ignoreMute,
|
||||||
style,
|
style,
|
||||||
|
activeStyle,
|
||||||
childContainerStyle,
|
childContainerStyle,
|
||||||
children,
|
children,
|
||||||
}: React.PropsWithChildren<{
|
}: {
|
||||||
testID?: string
|
testID?: string
|
||||||
modui: ModerationUI | undefined
|
modui: ModerationUI | undefined
|
||||||
ignoreMute?: boolean
|
ignoreMute?: boolean
|
||||||
style?: StyleProp<ViewStyle>
|
style?: StyleProp<ViewStyle>
|
||||||
|
activeStyle?: StyleProp<ViewStyle>
|
||||||
childContainerStyle?: StyleProp<ViewStyle>
|
childContainerStyle?: StyleProp<ViewStyle>
|
||||||
}>) {
|
children?: React.ReactNode | ((props: {active: boolean}) => React.ReactNode)
|
||||||
|
}) {
|
||||||
const blur = modui?.blurs[0]
|
const blur = modui?.blurs[0]
|
||||||
if (!blur || (ignoreMute && isJustAMute(modui))) {
|
if (!blur || (ignoreMute && isJustAMute(modui))) {
|
||||||
return (
|
return (
|
||||||
<View testID={testID} style={style}>
|
<View testID={testID} style={style}>
|
||||||
{children}
|
{typeof children === 'function' ? children({active: false}) : children}
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -44,9 +47,9 @@ export function ContentHider({
|
|||||||
<ContentHiderActive
|
<ContentHiderActive
|
||||||
testID={testID}
|
testID={testID}
|
||||||
modui={modui}
|
modui={modui}
|
||||||
style={style}
|
style={[style, activeStyle]}
|
||||||
childContainerStyle={childContainerStyle}>
|
childContainerStyle={childContainerStyle}>
|
||||||
{children}
|
{typeof children === 'function' ? children({active: true}) : children}
|
||||||
</ContentHiderActive>
|
</ContentHiderActive>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user