1
0
Code Issues Pull Requests Packages Projects Releases Wiki Activity GitHub Gitee

Chech downloaded hash

This commit is contained in:
sunnylqm 2021-11-04 16:35:34 +08:00
parent 53d07406ef
commit 4d72d49fe4
2 changed files with 6 additions and 0 deletions
Example/testHotUpdate/src
lib

@ -68,6 +68,9 @@ export default class App extends Component {
});
},
});
if (!hash) {
return;
}
Alert.alert('提示', '下载完毕,是否重启应用?', [
{
text: '是',

@ -41,6 +41,9 @@ export function simpleUpdate(WrappedComponent) {
doUpdate = async (info) => {
try {
const hash = await downloadUpdate(info);
if (!hash) {
return;
}
this.stateListener.remove();
Alert.alert('提示', '下载完毕,是否立即更新?', [
{