TP-39794 | master merge

This commit is contained in:
Aman Chaturvedi
2024-03-04 13:42:44 +05:30
4 changed files with 19 additions and 11 deletions

View File

@@ -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

View File

@@ -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",

View File

@@ -36,7 +36,6 @@ const BlockerScreen = (props: IBlockerScreen) => {
);
const { isWifiOrCellularOn, appState } = useAppSelector((state) => state.metadata);
const [shouldUpdate, setShouldUpdate] = useState<boolean>();
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_INTERNET_BLOCKER_SCREEN_LOAD);
}
}, [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 (

View File

@@ -814,6 +814,11 @@ export const CLICKSTREAM_EVENT_NAMES = {
name: 'FA_ADDRESS_ADD_FEEDBACK_CLICKED',
description: 'FA_ADDRESS_ADD_FEEDBACK_CLICKED',
},
FA_INTERNET_BLOCKER_SCREEN_LOAD: {
name: 'FA_INTERNET_BLOCKER_SCREEN_LOAD',
description: 'FA_INTERNET_BLOCKER_SCREEN_LOAD',
}
} as const;
export enum MimeType {