1
0
mirror of https://gitcode.com/gh_mirrors/re/react-native-pushy.git synced 2025-09-17 17:06:10 +08:00
Code Issues Packages Projects Releases Wiki Activity GitHub Gitee

Compare commits

..

4 Commits

Author SHA1 Message Date
sunnylqm
53d07406ef v7.3.1 2021-10-30 14:56:58 +08:00
sunnylqm
d0804cfe15 Fix rolledBackVersion 2021-10-30 14:56:23 +08:00
sunnylqm
35939286d0 v7.3.0 2021-10-29 13:03:34 +08:00
sunnylqm
f49ce30cef Fix assertHash 2021-10-29 13:02:49 +08:00
2 changed files with 12 additions and 9 deletions

View File

@@ -175,8 +175,8 @@ export async function downloadUpdate(options, eventListeners) {
if (!options.update) {
return;
}
if (rolledbackVersion === options.hash) {
logger(`rolledback hash ${rolledbackVersion}, ignored`);
if (rolledBackVersion === options.hash) {
logger(`rolledback hash ${rolledBackVersion}, ignored`);
return;
}
if (downloadedHash === options.hash) {
@@ -268,20 +268,23 @@ function assertHash(hash) {
return;
}
readyHash = hash;
return true;
}
export function switchVersion(hash) {
assertRelease();
assertHash(hash);
logger('switchVersion: ' + hash);
Pushy.reloadUpdate({ hash });
if (assertHash(hash)) {
logger('switchVersion: ' + hash);
Pushy.reloadUpdate({ hash });
}
}
export function switchVersionLater(hash) {
assertRelease();
assertHash(hash);
logger('switchVersionLater: ' + hash);
Pushy.setNeedUpdate({ hash });
if (assertHash(hash)) {
logger('switchVersionLater: ' + hash);
Pushy.setNeedUpdate({ hash });
}
}
let marked = false;

View File

@@ -1,6 +1,6 @@
{
"name": "react-native-update",
"version": "7.2.0",
"version": "7.3.1",
"description": "react-native hot update",
"main": "lib/index.js",
"scripts": {