TP-22783 | added semver fixes and upgraded version (#210)

This commit is contained in:
Ishan Srivastava
2023-04-05 16:07:21 +05:30
committed by GitHub Enterprise
parent 6367b1dd01
commit 8a08dddc4a
4 changed files with 8 additions and 5 deletions

View File

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

View File

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

View File

@@ -15,6 +15,9 @@ interface IForceUninstallScreen {
const ForceUninstallScreen = (props: IForceUninstallScreen) => {
const [forceReinstallData, setForceReinstallData] = useState<UninstallInformation>();
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;
}