1
0
Code Issues Pull Requests 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
No known key found for this signature in database

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(
'提示',