Fix display of link cards in DMs (#11458)

This commit is contained in:
Samuel Newman
2026-08-13 15:48:56 +03:00
committed by GitHub
parent 419a49019d
commit da93da4191
3 changed files with 9 additions and 6 deletions
@@ -92,7 +92,7 @@ export const ExternalEmbed = ({
style={[a.rounded_md]}
onPress={onPress}
onLongPress={onShareExternal}>
{({hovered}) => (
{({hovered, pressed}) => (
<View
style={[
a.transition_color,
@@ -101,7 +101,7 @@ export const ExternalEmbed = ({
a.overflow_hidden,
a.w_full,
a.border,
t.atoms.bg,
pressed && t.atoms.bg,
style,
hovered
? t.atoms.border_contrast_high
@@ -129,7 +129,6 @@ export const StandardSiteEmbed = ({
a.rounded_lg,
a.w_full,
a.border,
t.atoms.bg,
interacted ? t.atoms.border_contrast_high : t.atoms.border_contrast_low,
preview && a.pointer_events_none,
style,
@@ -154,7 +153,7 @@ export const StandardSiteEmbed = ({
})}
onFocus={onInteract}
onBlur={onInteractOut}>
{() => (
{({pressed}) => (
<View
style={[
a.w_full,
@@ -171,7 +170,7 @@ export const StandardSiteEmbed = ({
borderBottomLeftRadius: a.rounded_lg.borderRadius,
borderBottomRightRadius: a.rounded_lg.borderRadius,
},
interacted ? t.atoms.bg_contrast_25 : t.atoms.bg,
interacted ? t.atoms.bg_contrast_25 : pressed && t.atoms.bg,
]}>
{imageUri ? (
<Image
+5 -1
View File
@@ -68,7 +68,11 @@ export function Embed({embed: rawEmbed, ...rest}: EmbedProps) {
}
case 'post_with_media': {
return (
<View style={rest.style}>
<View
style={[
rest.style,
rest.viewContext === PostEmbedViewContext.ChatMessage && a.gap_sm,
]}>
<MediaEmbed embed={embed.media} {...rest} />
<RecordEmbed embed={embed.view} {...rest} />
</View>