diff --git a/src/screens/CommonPage/CommonPage.tsx b/src/screens/CommonPage/CommonPage.tsx index 7da5c62..de66b45 100644 --- a/src/screens/CommonPage/CommonPage.tsx +++ b/src/screens/CommonPage/CommonPage.tsx @@ -63,15 +63,15 @@ function CommonPage() { const checkUpdates = async () => { - const currentVersion = Constants.manifest2?.extra?.expoClient?.version + const currentVersion = Constants.manifest2?.extra?.expoClient?.version || Constants.manifest?.version; applicationApi.getVersion('assemblr').then(({latest_version}) => { + if (currentVersion == latest_version) return; dispatch(setIndeterminate(false)); dispatch(setLoadingText("Загрузка обновления...")); dispatch(setProgress(0)); dispatch(openLoadingModal()); - - const apkPath = FileSystem.documentDirectory + "test.apk"; + const apkPath = FileSystem.documentDirectory + "update.apk"; applicationApi.download(apkPath, 'assemblr', latest_version, data => { dispatch(setProgress(data.totalBytesWritten / data.totalBytesExpectedToWrite)); }).then(() => {