1
0
mirror of https://gitcode.com/gh_mirrors/re/react-native-pushy.git synced 2025-09-16 12:11:39 +08:00
Code Issues Packages Projects Releases Wiki Activity GitHub Gitee

prevent duplicated apk download

This commit is contained in:
sunnylqm
2025-03-14 16:05:04 +08:00
parent a52d18dce2
commit 06fc213da3
2 changed files with 2 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
{ {
"name": "react-native-update", "name": "react-native-update",
"version": "10.26.3", "version": "10.26.4",
"description": "react-native hot update", "description": "react-native hot update",
"main": "src/index", "main": "src/index",
"scripts": { "scripts": {

View File

@@ -181,7 +181,7 @@ export const UpdateProvider = ({
setUpdateInfo(info); setUpdateInfo(info);
if (info.expired) { if (info.expired) {
const { downloadUrl } = info; const { downloadUrl } = info;
if (downloadUrl) { if (downloadUrl && Pushy.apkStatus === null) {
if (options.updateStrategy === 'silentAndNow') { if (options.updateStrategy === 'silentAndNow') {
if (Platform.OS === 'android' && downloadUrl.endsWith('.apk')) { if (Platform.OS === 'android' && downloadUrl.endsWith('.apk')) {
downloadAndInstallApk(downloadUrl); downloadAndInstallApk(downloadUrl);