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

do not show alert if no downloadurl

This commit is contained in:
sunnylqm
2024-03-21 22:11:09 +08:00
parent fe75a2ca9e
commit b512ae18b7

View File

@@ -124,20 +124,20 @@ export const PushyProvider = ({
setUpdateInfo(info);
if (info.expired) {
const { downloadUrl } = info;
showAlert('提示', '您的应用版本已更新,点击更新下载安装新版本', [
{
text: '更新',
onPress: () => {
if (downloadUrl) {
if (downloadUrl) {
showAlert('提示', '您的应用版本已更新,点击更新下载安装新版本', [
{
text: '更新',
onPress: () => {
if (Platform.OS === 'android' && downloadUrl.endsWith('.apk')) {
downloadAndInstallApk(downloadUrl);
} else {
Linking.openURL(downloadUrl);
}
}
},
},
},
]);
]);
}
} else if (info.update) {
showAlert(
'提示',