mirror of
				https://gitcode.com/gh_mirrors/re/react-native-pushy.git
				synced 2025-10-31 21:33:12 +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
	 sunnylqm
					sunnylqm