Skip to content

Commit

Permalink
fix: link briefly shown before magic code is requested
Browse files Browse the repository at this point in the history
  • Loading branch information
nkdengineer committed Dec 9, 2024
1 parent 7925c9b commit 7c12b42
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/libs/actions/Link.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,12 @@ function openLink(href: string, environmentURL: string, isAttachment = false) {
Navigation.navigate(internalNewExpensifyPath as Route);
return;
}
const OLD_DOT_PUBLIC_URLS: string[] = [CONST.TERMS_URL, CONST.PRIVACY_URL];

// If we are handling an old dot Expensify link we need to open it with openOldDotLink() so we can navigate to it with the user already logged in.
// As attachments also use expensify.com we don't want it working the same as links.
if (internalExpensifyPath && !isAttachment) {
const isPublicOldDotURL = OLD_DOT_PUBLIC_URLS.includes(href);
if (internalExpensifyPath && !isAttachment && !isPublicOldDotURL) {
openOldDotLink(internalExpensifyPath);
return;
}
Expand Down

0 comments on commit 7c12b42

Please sign in to comment.