From 5dc24eca0656bb4ff60eed3b8030ec582a27e67d Mon Sep 17 00:00:00 2001 From: staszekscp Date: Thu, 25 Jul 2024 14:07:28 +0200 Subject: [PATCH 1/2] fix list for updating app in Hybrid --- src/CONST.ts | 2 ++ src/libs/actions/AppUpdate/updateApp/index.android.ts | 4 ++-- src/libs/actions/AppUpdate/updateApp/index.ios.ts | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/CONST.ts b/src/CONST.ts index c7a6741da314..b6c645457fa2 100755 --- a/src/CONST.ts +++ b/src/CONST.ts @@ -230,6 +230,8 @@ const CONST = { ANDROID: `https://play.google.com/store/apps/details?id=${ANDROID_PACKAGE_NAME}`, IOS: 'https://apps.apple.com/us/app/expensify-cash/id1530278510', DESKTOP: `${ACTIVE_EXPENSIFY_URL}NewExpensify.dmg`, + OLD_DOT_ANDROID: 'https://play.google.com/store/apps/details?id=org.me.mobiexpensifyg&hl=en_US&pli=1', + OLD_DOT_IOS: 'https://apps.apple.com/us/app/expensify-expense-tracker/id471713959' }, DATE: { SQL_DATE_TIME: 'YYYY-MM-DD HH:mm:ss', diff --git a/src/libs/actions/AppUpdate/updateApp/index.android.ts b/src/libs/actions/AppUpdate/updateApp/index.android.ts index 7b0022b3e970..3f2cde77f466 100644 --- a/src/libs/actions/AppUpdate/updateApp/index.android.ts +++ b/src/libs/actions/AppUpdate/updateApp/index.android.ts @@ -1,6 +1,6 @@ -import {Linking} from 'react-native'; +import {Linking, NativeModules} from 'react-native'; import CONST from '@src/CONST'; export default function updateApp() { - Linking.openURL(CONST.APP_DOWNLOAD_LINKS.ANDROID); + Linking.openURL(NativeModules.HybridAppModule ? CONST.APP_DOWNLOAD_LINKS.OLD_DOT_ANDROID : CONST.APP_DOWNLOAD_LINKS.ANDROID); } diff --git a/src/libs/actions/AppUpdate/updateApp/index.ios.ts b/src/libs/actions/AppUpdate/updateApp/index.ios.ts index 59f25888de11..466e5f961137 100644 --- a/src/libs/actions/AppUpdate/updateApp/index.ios.ts +++ b/src/libs/actions/AppUpdate/updateApp/index.ios.ts @@ -1,6 +1,7 @@ import {Linking} from 'react-native'; import CONST from '@src/CONST'; +import { NativeModules } from 'react-native'; export default function updateApp() { - Linking.openURL(CONST.APP_DOWNLOAD_LINKS.IOS); + Linking.openURL(NativeModules.HybridAppModule ? CONST.APP_DOWNLOAD_LINKS.OLD_DOT_IOS : CONST.APP_DOWNLOAD_LINKS.IOS); } From 43c6720a07553ca5fab7d855f3b353e2e1c7b774 Mon Sep 17 00:00:00 2001 From: staszekscp Date: Thu, 25 Jul 2024 14:11:32 +0200 Subject: [PATCH 2/2] prettier --- src/CONST.ts | 2 +- src/libs/actions/AppUpdate/updateApp/index.ios.ts | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/CONST.ts b/src/CONST.ts index b6c645457fa2..bc7506dec474 100755 --- a/src/CONST.ts +++ b/src/CONST.ts @@ -231,7 +231,7 @@ const CONST = { IOS: 'https://apps.apple.com/us/app/expensify-cash/id1530278510', DESKTOP: `${ACTIVE_EXPENSIFY_URL}NewExpensify.dmg`, OLD_DOT_ANDROID: 'https://play.google.com/store/apps/details?id=org.me.mobiexpensifyg&hl=en_US&pli=1', - OLD_DOT_IOS: 'https://apps.apple.com/us/app/expensify-expense-tracker/id471713959' + OLD_DOT_IOS: 'https://apps.apple.com/us/app/expensify-expense-tracker/id471713959', }, DATE: { SQL_DATE_TIME: 'YYYY-MM-DD HH:mm:ss', diff --git a/src/libs/actions/AppUpdate/updateApp/index.ios.ts b/src/libs/actions/AppUpdate/updateApp/index.ios.ts index 466e5f961137..930a57881128 100644 --- a/src/libs/actions/AppUpdate/updateApp/index.ios.ts +++ b/src/libs/actions/AppUpdate/updateApp/index.ios.ts @@ -1,6 +1,5 @@ -import {Linking} from 'react-native'; +import {Linking, NativeModules} from 'react-native'; import CONST from '@src/CONST'; -import { NativeModules } from 'react-native'; export default function updateApp() { Linking.openURL(NativeModules.HybridAppModule ? CONST.APP_DOWNLOAD_LINKS.OLD_DOT_IOS : CONST.APP_DOWNLOAD_LINKS.IOS);