fix(mobile): use tryOpenExternalUrl for markdown links in ThreadFeed (#5872)
Co-authored-by: codex <[email protected]> Co-authored-by: Julius Marminge <[email protected]>
This commit is contained in:
1 file changed
+4
-4
@@ -28,7 +28,6 @@ import {
|
||||
import {
|
||||
ActivityIndicator,
|
||||
Image,
|
||||
Linking,
|
||||
Platform,
|
||||
type LayoutChangeEvent,
|
||||
type NativeScrollEvent,
|
||||
@@ -51,6 +50,7 @@ import { IOS_NAV_BAR_HEIGHT } from "../../lib/layoutMetrics";
|
||||
import { useFontFamily } from "../../lib/useFontFamily";
|
||||
import { scopedThreadKey } from "../../lib/scopedEntities";
|
||||
import { copyTextWithHaptic } from "../../lib/copyTextWithHaptic";
|
||||
import { tryOpenExternalUrl } from "../../lib/openExternalUrl";
|
||||
import { hasWideMarkdownBlock } from "../../lib/wideMarkdownBlocks";
|
||||
import {
|
||||
hasNativeSelectableMarkdownText,
|
||||
@@ -283,7 +283,7 @@ const MarkdownExternalLink = memo(function MarkdownExternalLink(props: {
|
||||
<NativeText
|
||||
className="font-sans"
|
||||
onPress={() => {
|
||||
void Linking.openURL(props.href);
|
||||
void tryOpenExternalUrl(props.href, "markdown-link");
|
||||
}}
|
||||
style={{
|
||||
color: props.color,
|
||||
@@ -613,7 +613,7 @@ function useMarkdownStyles(onLinkPress: (href: string) => void): MarkdownStyleSe
|
||||
onPress={
|
||||
linkHref
|
||||
? () => {
|
||||
void Linking.openURL(linkHref);
|
||||
void tryOpenExternalUrl(linkHref, "markdown-link");
|
||||
}
|
||||
: undefined
|
||||
}
|
||||
@@ -1436,7 +1436,7 @@ export const ThreadFeed = memo(function ThreadFeed(props: ThreadFeedProps) {
|
||||
}
|
||||
|
||||
if (presentation.href) {
|
||||
void Linking.openURL(presentation.href);
|
||||
void tryOpenExternalUrl(presentation.href, "markdown-link");
|
||||
}
|
||||
},
|
||||
[props.environmentId, props.threadId, props.workspaceRoot, navigation],
|
||||
|
||||
Reference in new issue
Block a user