Skip to content

Commit

Permalink
fix: inability to handle long URLs with params properly when clicked …
Browse files Browse the repository at this point in the history
…on message
  • Loading branch information
khushal87 committed Nov 20, 2023
1 parent be241e1 commit 9098ed4
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,15 @@ export const renderText = <
: Linking.canOpenURL(url).then((canOpenUrl) => canOpenUrl && Linking.openURL(url));
};

let previousLink: string;
const linkReact: ReactNodeOutput = (node, output, { ...state }) => {
const url = node.target;
let url: string;
if (state?.withinLink) {
url = previousLink;
} else {
url = node.target;
previousLink = node.target;
}
const onPress = (event: GestureResponderEvent) => {
if (!preventPress && onPressParam) {
onPressParam({
Expand Down

0 comments on commit 9098ed4

Please sign in to comment.