@@ -42,7 +42,7 @@ public override IReadOnlyDictionary<string, object> Constants
42
42
{ "codePushInstallModeOnNextRestart" , InstallMode . OnNextRestart } ,
43
43
{ "codePushUpdateStateRunning" , UpdateState . Running } ,
44
44
{ "codePushUpdateStatePending" , UpdateState . Pending } ,
45
- { "codePushUpdateStateLatest" , UpdateState . Lastest } ,
45
+ { "codePushUpdateStateLatest" , UpdateState . Latest } ,
46
46
} ;
47
47
}
48
48
}
@@ -59,8 +59,8 @@ public void downloadUpdate(JObject updatePackage, bool notifyProgress, IPromise
59
59
{
60
60
try
61
61
{
62
- updatePackage [ CodePushConstants . BinaryModifiedTimeKey ] = "" + await _codePush . GetBinaryResourcesModifiedTime ( ) ;
63
- await _codePush . UpdateManager . DownloadPackage (
62
+ updatePackage [ CodePushConstants . BinaryModifiedTimeKey ] = "" + await _codePush . GetBinaryResourcesModifiedTimeAsync ( ) ;
63
+ await _codePush . UpdateManager . DownloadPackageAsync (
64
64
updatePackage ,
65
65
_codePush . AssetsBundleFileName ,
66
66
new Progress < HttpProgress > (
@@ -84,7 +84,7 @@ await _codePush.UpdateManager.DownloadPackage(
84
84
)
85
85
) ;
86
86
87
- JObject newPackage = await _codePush . UpdateManager . GetPackage ( ( string ) updatePackage [ CodePushConstants . PackageHashKey ] ) ;
87
+ JObject newPackage = await _codePush . UpdateManager . GetPackageAsync ( ( string ) updatePackage [ CodePushConstants . PackageHashKey ] ) ;
88
88
promise . Resolve ( newPackage ) ;
89
89
}
90
90
catch ( InvalidDataException e )
@@ -128,7 +128,7 @@ public void getUpdateMetadata(UpdateState updateState, IPromise promise)
128
128
{
129
129
Action getCurrentPackageAction = async ( ) =>
130
130
{
131
- JObject currentPackage = await _codePush . UpdateManager . GetCurrentPackage ( ) ;
131
+ JObject currentPackage = await _codePush . UpdateManager . GetCurrentPackageAsync ( ) ;
132
132
if ( currentPackage == null )
133
133
{
134
134
promise . Resolve ( "" ) ;
@@ -153,7 +153,7 @@ public void getUpdateMetadata(UpdateState updateState, IPromise promise)
153
153
{
154
154
// The caller wants the running update, but the current
155
155
// one is pending, so we need to grab the previous.
156
- promise . Resolve ( await _codePush . UpdateManager . GetPreviousPackage ( ) ) ;
156
+ promise . Resolve ( await _codePush . UpdateManager . GetPreviousPackageAsync ( ) ) ;
157
157
}
158
158
else
159
159
{
@@ -191,7 +191,7 @@ public void installUpdate(JObject updatePackage, InstallMode installMode, int mi
191
191
{
192
192
Action installUpdateAction = async ( ) =>
193
193
{
194
- await _codePush . UpdateManager . InstallPackage ( updatePackage , SettingsManager . IsPendingUpdate ( null ) ) ;
194
+ await _codePush . UpdateManager . InstallPackageAsync ( updatePackage , SettingsManager . IsPendingUpdate ( null ) ) ;
195
195
var pendingHash = ( string ) updatePackage [ CodePushConstants . PackageHashKey ] ;
196
196
SettingsManager . SavePendingUpdate ( pendingHash , /* isLoading */ false ) ;
197
197
if ( installMode == InstallMode . OnNextResume )
@@ -203,7 +203,7 @@ public void installUpdate(JObject updatePackage, InstallMode installMode, int mi
203
203
{
204
204
Context . RunOnNativeModulesQueueThread ( async ( ) =>
205
205
{
206
- await LoadBundle ( ) ;
206
+ await LoadBundleAsync ( ) ;
207
207
} ) ;
208
208
} ;
209
209
@@ -236,7 +236,7 @@ public void isFirstRun(string packageHash, IPromise promise)
236
236
bool isFirstRun = _codePush . DidUpdate
237
237
&& packageHash != null
238
238
&& packageHash . Length > 0
239
- && packageHash . Equals ( await _codePush . UpdateManager . GetCurrentPackageHash ( ) ) ;
239
+ && packageHash . Equals ( await _codePush . UpdateManager . GetCurrentPackageHashAsync ( ) ) ;
240
240
promise . Resolve ( isFirstRun ) ;
241
241
} ;
242
242
@@ -259,14 +259,14 @@ public void restartApp(bool onlyIfUpdateIsPending)
259
259
// is current pending update, then reload the app.
260
260
if ( ! onlyIfUpdateIsPending || SettingsManager . IsPendingUpdate ( null ) )
261
261
{
262
- await LoadBundle ( ) ;
262
+ await LoadBundleAsync ( ) ;
263
263
}
264
264
} ;
265
265
266
266
Context . RunOnNativeModulesQueueThread ( restartAppAction ) ;
267
267
}
268
268
269
- internal async Task LoadBundle ( )
269
+ internal async Task LoadBundleAsync ( )
270
270
{
271
271
// #1) Get the private ReactInstanceManager, which is what includes
272
272
// the logic to reload the current React context.
0 commit comments