From 8a08dddc4a2e3affd67cf7e719c7326d00eb0ce2 Mon Sep 17 00:00:00 2001 From: Ishan Srivastava Date: Wed, 5 Apr 2023 16:07:21 +0530 Subject: [PATCH] TP-22783 | added semver fixes and upgraded version (#210) --- RN-UI-LIB | 2 +- android/app/build.gradle | 4 ++-- package.json | 2 +- src/common/ForceUninstallScreen.tsx | 5 ++++- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/RN-UI-LIB b/RN-UI-LIB index 106cc696..70084651 160000 --- a/RN-UI-LIB +++ b/RN-UI-LIB @@ -1 +1 @@ -Subproject commit 106cc696c1f1c713c8318c7e2f1963cc45635df9 +Subproject commit 70084651bb3bd0030402f584551a7f4a6432342b diff --git a/android/app/build.gradle b/android/app/build.gradle index f7e8b41f..67bb1138 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -131,8 +131,8 @@ def reactNativeArchitectures() { return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"] } -def VERSION_CODE = 40 -def VERSION_NAME = "2.0.9" +def VERSION_CODE = 42 +def VERSION_NAME = "2.1.1" android { ndkVersion rootProject.ext.ndkVersion diff --git a/package.json b/package.json index b8a970a6..bb427a7f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "AV_APP", - "version": "2.0.9", + "version": "2.1.1", "private": true, "scripts": { "android:dev": "yarn move:dev && react-native run-android", diff --git a/src/common/ForceUninstallScreen.tsx b/src/common/ForceUninstallScreen.tsx index ce518c8d..2ca76fa1 100644 --- a/src/common/ForceUninstallScreen.tsx +++ b/src/common/ForceUninstallScreen.tsx @@ -15,6 +15,9 @@ interface IForceUninstallScreen { const ForceUninstallScreen = (props: IForceUninstallScreen) => { const [forceReinstallData, setForceReinstallData] = useState(); + function compareSemverVersions(a: string,b: string){ + return a.localeCompare(b, undefined, { numeric: true, sensitivity: 'base' }) +} const forceUninstallData = useSelector( (state: RootState) =>{ return state.metadata?.forceUninstall} @@ -27,7 +30,7 @@ const ForceUninstallScreen = (props: IForceUninstallScreen) => { React.useEffect(()=>{ for (const versionName of Object.keys(forceUninstallData)){ const uninstallData = forceUninstallData[versionName] - if((getAppVersion()).localeCompare(versionName)<1 && Date.now()>=uninstallData.last_operational_time){ + if(compareSemverVersions(getAppVersion(),versionName)<1 && Date.now()>=uninstallData.last_operational_time){ setForceReinstallData(uninstallData) return; }