From cecb40febfb2755774b752f1e952c96d052b63b7 Mon Sep 17 00:00:00 2001 From: Adam Grzybowski Date: Tue, 19 Mar 2024 11:31:14 +0100 Subject: [PATCH 1/3] add shouldSkipDeepLinkNavigation for web --- src/libs/shouldSkipDeepLinkNavigation/index.web.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/libs/shouldSkipDeepLinkNavigation/index.web.ts diff --git a/src/libs/shouldSkipDeepLinkNavigation/index.web.ts b/src/libs/shouldSkipDeepLinkNavigation/index.web.ts new file mode 100644 index 000000000000..0a2d7f533e74 --- /dev/null +++ b/src/libs/shouldSkipDeepLinkNavigation/index.web.ts @@ -0,0 +1,12 @@ +import ROUTES from '@src/ROUTES'; + +export default function shouldSkipDeepLinkNavigation(route: string) { + // When deep-linking to desktop app with `transition` route we don't want to call navigate + // on the route because it will display an infinite loading indicator. + // See issue: https://github.com/Expensify/App/issues/33149 + if (route.includes(ROUTES.TRANSITION_BETWEEN_APPS)) { + return true; + } + + return false; +} From 748898371f1c45e56e6bf29485a94e3f89383f32 Mon Sep 17 00:00:00 2001 From: Adam Grzybowski Date: Tue, 19 Mar 2024 13:08:43 +0100 Subject: [PATCH 2/3] add shouldSkipDeepLinkNavigation for all platforms --- ...ex.desktop.ts => shouldSkipDeepLinkNavigation.ts} | 0 src/libs/shouldSkipDeepLinkNavigation/index.ts | 5 ----- src/libs/shouldSkipDeepLinkNavigation/index.web.ts | 12 ------------ 3 files changed, 17 deletions(-) rename src/libs/{shouldSkipDeepLinkNavigation/index.desktop.ts => shouldSkipDeepLinkNavigation.ts} (100%) delete mode 100644 src/libs/shouldSkipDeepLinkNavigation/index.ts delete mode 100644 src/libs/shouldSkipDeepLinkNavigation/index.web.ts diff --git a/src/libs/shouldSkipDeepLinkNavigation/index.desktop.ts b/src/libs/shouldSkipDeepLinkNavigation.ts similarity index 100% rename from src/libs/shouldSkipDeepLinkNavigation/index.desktop.ts rename to src/libs/shouldSkipDeepLinkNavigation.ts diff --git a/src/libs/shouldSkipDeepLinkNavigation/index.ts b/src/libs/shouldSkipDeepLinkNavigation/index.ts deleted file mode 100644 index 8a2d8035507f..000000000000 --- a/src/libs/shouldSkipDeepLinkNavigation/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -// eslint-disable-next-line @typescript-eslint/no-unused-vars -export default function shouldSkipDeepLinkNavigation(route: string) { - // no-op for all other platforms - return false; -} diff --git a/src/libs/shouldSkipDeepLinkNavigation/index.web.ts b/src/libs/shouldSkipDeepLinkNavigation/index.web.ts deleted file mode 100644 index 0a2d7f533e74..000000000000 --- a/src/libs/shouldSkipDeepLinkNavigation/index.web.ts +++ /dev/null @@ -1,12 +0,0 @@ -import ROUTES from '@src/ROUTES'; - -export default function shouldSkipDeepLinkNavigation(route: string) { - // When deep-linking to desktop app with `transition` route we don't want to call navigate - // on the route because it will display an infinite loading indicator. - // See issue: https://github.com/Expensify/App/issues/33149 - if (route.includes(ROUTES.TRANSITION_BETWEEN_APPS)) { - return true; - } - - return false; -} From 0cbbf29e0448bf931c7ad18ac098010db6b600ae Mon Sep 17 00:00:00 2001 From: Adam Grzybowski Date: Tue, 19 Mar 2024 16:50:45 +0100 Subject: [PATCH 3/3] Revert "add shouldSkipDeepLinkNavigation for all platforms" This reverts commit 748898371f1c45e56e6bf29485a94e3f89383f32. --- .../index.desktop.ts} | 0 src/libs/shouldSkipDeepLinkNavigation/index.ts | 5 +++++ src/libs/shouldSkipDeepLinkNavigation/index.web.ts | 12 ++++++++++++ 3 files changed, 17 insertions(+) rename src/libs/{shouldSkipDeepLinkNavigation.ts => shouldSkipDeepLinkNavigation/index.desktop.ts} (100%) create mode 100644 src/libs/shouldSkipDeepLinkNavigation/index.ts create mode 100644 src/libs/shouldSkipDeepLinkNavigation/index.web.ts diff --git a/src/libs/shouldSkipDeepLinkNavigation.ts b/src/libs/shouldSkipDeepLinkNavigation/index.desktop.ts similarity index 100% rename from src/libs/shouldSkipDeepLinkNavigation.ts rename to src/libs/shouldSkipDeepLinkNavigation/index.desktop.ts diff --git a/src/libs/shouldSkipDeepLinkNavigation/index.ts b/src/libs/shouldSkipDeepLinkNavigation/index.ts new file mode 100644 index 000000000000..8a2d8035507f --- /dev/null +++ b/src/libs/shouldSkipDeepLinkNavigation/index.ts @@ -0,0 +1,5 @@ +// eslint-disable-next-line @typescript-eslint/no-unused-vars +export default function shouldSkipDeepLinkNavigation(route: string) { + // no-op for all other platforms + return false; +} diff --git a/src/libs/shouldSkipDeepLinkNavigation/index.web.ts b/src/libs/shouldSkipDeepLinkNavigation/index.web.ts new file mode 100644 index 000000000000..0a2d7f533e74 --- /dev/null +++ b/src/libs/shouldSkipDeepLinkNavigation/index.web.ts @@ -0,0 +1,12 @@ +import ROUTES from '@src/ROUTES'; + +export default function shouldSkipDeepLinkNavigation(route: string) { + // When deep-linking to desktop app with `transition` route we don't want to call navigate + // on the route because it will display an infinite loading indicator. + // See issue: https://github.com/Expensify/App/issues/33149 + if (route.includes(ROUTES.TRANSITION_BETWEEN_APPS)) { + return true; + } + + return false; +}