mirror of
https://gitcode.com/gh_mirrors/re/react-native-pushy.git
synced 2025-11-01 05:43:11 +08:00
Chech downloaded hash
This commit is contained in:
@@ -68,6 +68,9 @@ export default class App extends Component {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
if (!hash) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
Alert.alert('提示', '下载完毕,是否重启应用?', [
|
Alert.alert('提示', '下载完毕,是否重启应用?', [
|
||||||
{
|
{
|
||||||
text: '是',
|
text: '是',
|
||||||
|
|||||||
@@ -41,6 +41,9 @@ export function simpleUpdate(WrappedComponent) {
|
|||||||
doUpdate = async (info) => {
|
doUpdate = async (info) => {
|
||||||
try {
|
try {
|
||||||
const hash = await downloadUpdate(info);
|
const hash = await downloadUpdate(info);
|
||||||
|
if (!hash) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.stateListener.remove();
|
this.stateListener.remove();
|
||||||
Alert.alert('提示', '下载完毕,是否立即更新?', [
|
Alert.alert('提示', '下载完毕,是否立即更新?', [
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user