From c0d99ab936ae61247c8196b1ae7ded359880db52 Mon Sep 17 00:00:00 2001 From: Geoffrey Goh Date: Mon, 29 Feb 2016 15:08:19 -0800 Subject: [PATCH] change var name --- CodePush.js | 9 +++------ .../main/java/com/microsoft/codepush/react/CodePush.java | 2 +- ios/CodePush/CodePush.m | 2 +- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/CodePush.js b/CodePush.js index 74bdd7c..70efd24 100644 --- a/CodePush.js +++ b/CodePush.js @@ -70,12 +70,9 @@ async function checkForUpdate(deploymentKey = null) { * because we want to avoid having to install diff updates against the binary's * version, which we can't do yet on Android. */ - if ( - !update || - update.updateAppVersion || - localPackage && (update.packageHash === localPackage.packageHash) || - (!localPackage || localPackage.isRunningBinaryVersion) && config.packageHash === update.packageHash - ) { + if (!update || update.updateAppVersion || + localPackage && (update.packageHash === localPackage.packageHash) || + (!localPackage || localPackage._isDebugOnly) && config.packageHash === update.packageHash) { if (update && update.updateAppVersion) { log("An update is available but it is targeting a newer binary version than you are currently running."); } diff --git a/android/app/src/main/java/com/microsoft/codepush/react/CodePush.java b/android/app/src/main/java/com/microsoft/codepush/react/CodePush.java index 89f972a..67314ef 100644 --- a/android/app/src/main/java/com/microsoft/codepush/react/CodePush.java +++ b/android/app/src/main/java/com/microsoft/codepush/react/CodePush.java @@ -424,7 +424,7 @@ public class CodePush { } if (isRunningBinaryVersion) { - currentPackage.putBoolean("isRunningBinaryVersion", isRunningBinaryVersion); + currentPackage.putBoolean("_isDebugOnly", isRunningBinaryVersion); } Boolean isPendingUpdate = false; diff --git a/ios/CodePush/CodePush.m b/ios/CodePush/CodePush.m index f48e0ff..7dc52ed 100644 --- a/ios/CodePush/CodePush.m +++ b/ios/CodePush/CodePush.m @@ -484,7 +484,7 @@ RCT_EXPORT_METHOD(getCurrentPackage:(RCTPromiseResolveBlock)resolve // This only matters in Debug builds. Since we do not clear "outdated" updates, // we need to indicate to the JS side that somehow we have a current update on // disk that is not actually running. - [package setObject:@(isRunningBinaryVersion) forKey:@"isRunningBinaryVersion"]; + [package setObject:@(isRunningBinaryVersion) forKey:@"_isDebugOnly"]; } // Add the "isPending" virtual property to the package at this point, so that