TP-22783 | added semver fixes and upgraded version (#210)
This commit is contained in:
committed by
GitHub Enterprise
parent
6367b1dd01
commit
8a08dddc4a
Submodule RN-UI-LIB updated: 106cc696c1...70084651bb
@@ -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
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user