@@ -124,7 +124,7 @@ public void getConfiguration(IPromise promise)
124
124
}
125
125
126
126
[ ReactMethod ]
127
- public void getUpdateMetadata ( int updateState , IPromise promise )
127
+ public void getUpdateMetadata ( UpdateState updateState , IPromise promise )
128
128
{
129
129
Action getCurrentPackageAction = async ( ) =>
130
130
{
@@ -143,13 +143,13 @@ public void getUpdateMetadata(int updateState, IPromise promise)
143
143
currentUpdateIsPending = SettingsManager . IsPendingUpdate ( currentHash ) ;
144
144
}
145
145
146
- if ( updateState == ( int ) UpdateState . Pending && ! currentUpdateIsPending )
146
+ if ( updateState == UpdateState . Pending && ! currentUpdateIsPending )
147
147
{
148
148
// The caller wanted a pending update
149
149
// but there isn't currently one.
150
150
promise . Resolve ( "" ) ;
151
151
}
152
- else if ( updateState == ( int ) UpdateState . Running && currentUpdateIsPending )
152
+ else if ( updateState == UpdateState . Running && currentUpdateIsPending )
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.
@@ -187,14 +187,14 @@ public void getNewStatusReport(IPromise promise)
187
187
}
188
188
189
189
[ ReactMethod ]
190
- public void installUpdate ( JObject updatePackage , int installMode , int minimumBackgroundDuration , IPromise promise )
190
+ public void installUpdate ( JObject updatePackage , InstallMode installMode , int minimumBackgroundDuration , IPromise promise )
191
191
{
192
192
Action installUpdateAction = async ( ) =>
193
193
{
194
194
await _codePush . UpdateManager . InstallPackage ( updatePackage , SettingsManager . IsPendingUpdate ( null ) ) ;
195
195
var pendingHash = ( string ) updatePackage [ CodePushConstants . PackageHashKey ] ;
196
196
SettingsManager . SavePendingUpdate ( pendingHash , /* isLoading */ false ) ;
197
- if ( installMode == ( int ) InstallMode . OnNextResume )
197
+ if ( installMode == InstallMode . OnNextResume )
198
198
{
199
199
if ( _minBackgroundListener == null )
200
200
{
0 commit comments