File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ const defaultClientOptions: ClientOptions = {
61
61
throwError : false ,
62
62
} ;
63
63
64
- const sharedState : {
64
+ export const sharedState : {
65
65
progressHandlers : Record < string , EmitterSubscription > ;
66
66
downloadedHash ?: string ;
67
67
apkStatus : 'downloading' | 'downloaded' | null ;
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import {
12
12
Platform ,
13
13
Linking ,
14
14
} from 'react-native' ;
15
- import { Pushy , Cresc } from './client' ;
15
+ import { Pushy , Cresc , sharedState } from './client' ;
16
16
import { currentVersion , packageVersion , getCurrentVersionInfo } from './core' ;
17
17
import { CheckResult , ProgressData , UpdateTestPayload } from './type' ;
18
18
import { UpdateContext } from './context' ;
@@ -190,7 +190,7 @@ export const UpdateProvider = ({
190
190
return ;
191
191
}
192
192
const { downloadUrl } = info ;
193
- if ( downloadUrl && Pushy . apkStatus === null ) {
193
+ if ( downloadUrl && sharedState . apkStatus === null ) {
194
194
if ( options . updateStrategy === 'silentAndNow' ) {
195
195
if ( Platform . OS === 'android' && downloadUrl . endsWith ( '.apk' ) ) {
196
196
downloadAndInstallApk ( downloadUrl ) ;
You can’t perform that action at this time.
0 commit comments