diff options
author | Hailey <me@haileyok.com> | 2025-02-27 13:18:30 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-02-27 13:18:30 -0800 |
commit | a2b71e3a4b786565938cef60924b27c5cd7f0660 (patch) | |
tree | ff78bc233ab5c1507b3f13f2dcbeaac96974ad07 /src/components/RichText.tsx | |
parent | a3d36393a16b6219d97d2a553aa426ab108f3168 (diff) | |
download | voidsky-a2b71e3a4b786565938cef60924b27c5cd7f0660.tar.zst |
tweak link handling (#7857)
Diffstat (limited to 'src/components/RichText.tsx')
-rw-r--r-- | src/components/RichText.tsx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/components/RichText.tsx b/src/components/RichText.tsx index 7005d0742..d501f4287 100644 --- a/src/components/RichText.tsx +++ b/src/components/RichText.tsx @@ -23,6 +23,7 @@ export type RichTextProps = TextStyleProp & onLinkPress?: LinkProps['onPress'] interactiveStyle?: TextStyle emojiMultiplier?: number + shouldProxyLinks?: boolean } export function RichText({ @@ -39,6 +40,7 @@ export function RichText({ emojiMultiplier = 1.85, onLayout, onTextLayout, + shouldProxyLinks, }: RichTextProps) { const richText = React.useMemo( () => @@ -110,6 +112,7 @@ export function RichText({ style={interactiveStyles} // @ts-ignore TODO dataSet={WORD_WRAP} + shouldProxy={shouldProxyLinks} onPress={onLinkPress}> {segment.text} </InlineLinkText> @@ -128,6 +131,7 @@ export function RichText({ // @ts-ignore TODO dataSet={WORD_WRAP} shareOnLongPress + shouldProxy={shouldProxyLinks} onPress={onLinkPress} emoji> {toShortUrl(segment.text)} |