Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion src/libs/Navigation/linkingConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,15 @@ import SCREENS from '@src/SCREENS';
import {RootStackParamList} from './types';

const linkingConfig: LinkingOptions<RootStackParamList> = {
prefixes: ['new-expensify://', 'https://www.expensify.cash', 'https://staging.expensify.cash', 'https://dev.new.expensify.com', CONST.NEW_EXPENSIFY_URL, CONST.STAGING_NEW_EXPENSIFY_URL],
prefixes: [
'app://-/',
'new-expensify://',
'https://www.expensify.cash',
'https://staging.expensify.cash',
'https://dev.new.expensify.com',
CONST.NEW_EXPENSIFY_URL,
CONST.STAGING_NEW_EXPENSIFY_URL,
],
config: {
initialRouteName: SCREENS.HOME,
screens: {
Expand Down
2 changes: 1 addition & 1 deletion src/libs/ReportUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3631,8 +3631,8 @@ function getRouteFromLink(url: string | null): string {

// Get the reportID from URL
let route = url;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
let route = url;
let route = url;
const localWebAndroidRegEx = /^((https|http):\/\/([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3}))/;

const localWebAndroidRegEx = /^(https:\/\/([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3}))/;
linkingConfig.prefixes.forEach((prefix) => {
const localWebAndroidRegEx = /^(http:\/\/([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3}))/;
if (route.startsWith(prefix)) {
Comment on lines 3635 to 3636

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Marking for reference

route = route.replace(prefix, '');
} else if (localWebAndroidRegEx.test(route)) {
Expand Down