From 267dc5e1956e662c6d790589833bfad92f304c3c Mon Sep 17 00:00:00 2001 From: yashmantri Date: Fri, 23 Feb 2024 14:44:24 +0530 Subject: [PATCH 1/3] TP-57833 | Added clickstream on the blocker screen when Cosmos is offline --- src/common/BlockerScreen.tsx | 17 ++++++++++------- src/common/Constants.ts | 5 +++++ 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src/common/BlockerScreen.tsx b/src/common/BlockerScreen.tsx index 67bdc2f8..4aba13d2 100644 --- a/src/common/BlockerScreen.tsx +++ b/src/common/BlockerScreen.tsx @@ -36,7 +36,6 @@ const BlockerScreen = (props: IBlockerScreen) => { ); const { isWifiOrCellularOn, appState } = useAppSelector((state) => state.metadata); - const [shouldUpdate, setShouldUpdate] = useState(); const [showActionBtnLoader, setShowActionBtnLoader] = useState(false); @@ -72,15 +71,14 @@ const BlockerScreen = (props: IBlockerScreen) => { setForceReinstallData(undefined); }, [JSON.stringify(forceUninstallData || {})]); - React.useEffect(() => { if (!appState) return; const buildToCompare = GLOBAL.BUILD_FLAVOUR; if (!buildToCompare) return; let flavorToUpdate: IAppState; - if(GLOBAL.BUILD_FLAVOUR.includes('fieldAgents')){ + if (GLOBAL.BUILD_FLAVOUR.includes('fieldAgents')) { flavorToUpdate = appState?.fieldAgent; - }else { + } else { flavorToUpdate = appState?.telecallingAgents; } @@ -110,6 +108,12 @@ const BlockerScreen = (props: IBlockerScreen) => { return () => appStateChange.remove(); }, []); + React.useEffect(() => { + if (!isWifiOrCellularOn) { + addClickstreamEvent(CLICKSTREAM_EVENT_NAMES.FA_DEVICE_WIFI_OR_CELLULAR_OFF); + } + }, [isWifiOrCellularOn]); + const handleDownloadNewApp = () => { if (forceReinstallData?.reinstall_endpoint) { openApkDownloadLink(forceReinstallData?.reinstall_endpoint); @@ -122,9 +126,9 @@ const BlockerScreen = (props: IBlockerScreen) => { const handleAppUpdate = () => { let appUpdateUrl; - if(GLOBAL.BUILD_FLAVOUR.includes(BUILD_FOR_FIELD)){ + if (GLOBAL.BUILD_FLAVOUR.includes(BUILD_FOR_FIELD)) { appUpdateUrl = appState?.fieldAgent.currentProdAPK; - }else { + } else { appUpdateUrl = appState?.telecallingAgents.currentProdAPK; } if (appUpdateUrl) { @@ -143,7 +147,6 @@ const BlockerScreen = (props: IBlockerScreen) => { } }; - if (shouldUpdate) { const { heading, instructions } = BLOCKER_SCREEN_DATA.UNINSTALL_APP; return ( diff --git a/src/common/Constants.ts b/src/common/Constants.ts index cc503bcb..7a56cf98 100644 --- a/src/common/Constants.ts +++ b/src/common/Constants.ts @@ -776,6 +776,11 @@ export const CLICKSTREAM_EVENT_NAMES = { name: 'FA_FEEDBACK_API_CALLED', description: 'FA_FEEDBACK_API_CALLED', }, + FA_DEVICE_WIFI_OR_CELLULAR_OFF: { + name: 'FA_DEVICE_WIFI_OR_CELLULAR_OFF', + description: 'FA_DEVICE_WIFI_OR_CELLULAR_OFF', + } + } as const; export enum MimeType { From edf9db53eb49f7c158c8863987070e3c3e263b59 Mon Sep 17 00:00:00 2001 From: yashmantri Date: Thu, 29 Feb 2024 12:16:05 +0530 Subject: [PATCH 2/3] TP-57833 | Clickstream name change --- src/common/BlockerScreen.tsx | 2 +- src/common/Constants.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/common/BlockerScreen.tsx b/src/common/BlockerScreen.tsx index 4aba13d2..fb10f4d4 100644 --- a/src/common/BlockerScreen.tsx +++ b/src/common/BlockerScreen.tsx @@ -110,7 +110,7 @@ const BlockerScreen = (props: IBlockerScreen) => { React.useEffect(() => { if (!isWifiOrCellularOn) { - addClickstreamEvent(CLICKSTREAM_EVENT_NAMES.FA_DEVICE_WIFI_OR_CELLULAR_OFF); + addClickstreamEvent(CLICKSTREAM_EVENT_NAMES.FA_INTERNET_BLOCKER_SCREEN_LOAD); } }, [isWifiOrCellularOn]); diff --git a/src/common/Constants.ts b/src/common/Constants.ts index 7a56cf98..5df99e4b 100644 --- a/src/common/Constants.ts +++ b/src/common/Constants.ts @@ -776,9 +776,9 @@ export const CLICKSTREAM_EVENT_NAMES = { name: 'FA_FEEDBACK_API_CALLED', description: 'FA_FEEDBACK_API_CALLED', }, - FA_DEVICE_WIFI_OR_CELLULAR_OFF: { - name: 'FA_DEVICE_WIFI_OR_CELLULAR_OFF', - description: 'FA_DEVICE_WIFI_OR_CELLULAR_OFF', + FA_INTERNET_BLOCKER_SCREEN_LOAD: { + name: 'FA_INTERNET_BLOCKER_SCREEN_LOAD', + description: 'FA_INTERNET_BLOCKER_SCREEN_LOAD', } } as const; From 340d5e775ded5777c8e4e71f4446579c658ca239 Mon Sep 17 00:00:00 2001 From: yashmantri Date: Thu, 29 Feb 2024 17:57:26 +0530 Subject: [PATCH 3/3] TP-57833 | Submodule Update --- android/app/build.gradle | 4 ++-- package.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 7635235e..13912800 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -134,8 +134,8 @@ def reactNativeArchitectures() { return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"] } -def VERSION_CODE = 128 -def VERSION_NAME = "2.7.10" +def VERSION_CODE = 129 +def VERSION_NAME = "2.8.0" android { ndkVersion rootProject.ext.ndkVersion diff --git a/package.json b/package.json index b17dc02a..383c6f31 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "AV_APP", - "version": "2.7.10", - "buildNumber": "128", + "version": "2.8.0", + "buildNumber": "129", "private": true, "scripts": { "android:dev": "yarn move:dev && react-native run-android",