mirror of
https://gitcode.com/gh_mirrors/re/react-native-pushy.git
synced 2025-09-16 10:01:38 +08:00
do not show alert if no downloadurl
This commit is contained in:
@@ -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(
|
||||
'提示',
|
||||
|
Reference in New Issue
Block a user