diff options
Diffstat (limited to 'src/view/com/util/post-embeds/ExternalLinkEmbed.tsx')
-rw-r--r-- | src/view/com/util/post-embeds/ExternalLinkEmbed.tsx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/view/com/util/post-embeds/ExternalLinkEmbed.tsx b/src/view/com/util/post-embeds/ExternalLinkEmbed.tsx index b84c04b83..3b2a12c24 100644 --- a/src/view/com/util/post-embeds/ExternalLinkEmbed.tsx +++ b/src/view/com/util/post-embeds/ExternalLinkEmbed.tsx @@ -19,10 +19,12 @@ import {Text} from '../text/Text' export const ExternalLinkEmbed = ({ link, + onOpen, style, hideAlt, }: { link: AppBskyEmbedExternal.ViewExternal + onOpen?: () => void style?: StyleProp<ViewStyle> hideAlt?: boolean }) => { @@ -44,7 +46,7 @@ export const ExternalLinkEmbed = ({ return ( <View style={[a.flex_col, a.rounded_sm, a.overflow_hidden, a.mt_sm]}> - <LinkWrapper link={link} style={style}> + <LinkWrapper link={link} onOpen={onOpen} style={style}> {link.thumb && !embedPlayerParams ? ( <Image style={{ @@ -97,10 +99,12 @@ export const ExternalLinkEmbed = ({ function LinkWrapper({ link, + onOpen, style, children, }: { link: AppBskyEmbedExternal.ViewExternal + onOpen?: () => void style?: StyleProp<ViewStyle> children: React.ReactNode }) { @@ -125,6 +129,7 @@ function LinkWrapper({ style, ]} hoverStyle={t.atoms.border_contrast_high} + onBeforePress={onOpen} onLongPress={onShareExternal}> {children} </Link> |