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 = {
6161 throwError : false ,
6262} ;
6363
64- const sharedState : {
64+ export const sharedState : {
6565 progressHandlers : Record < string , EmitterSubscription > ;
6666 downloadedHash ?: string ;
6767 apkStatus : 'downloading' | 'downloaded' | null ;
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import {
1212 Platform ,
1313 Linking ,
1414} from 'react-native' ;
15- import { Pushy , Cresc } from './client' ;
15+ import { Pushy , Cresc , sharedState } from './client' ;
1616import { currentVersion , packageVersion , getCurrentVersionInfo } from './core' ;
1717import { CheckResult , ProgressData , UpdateTestPayload } from './type' ;
1818import { UpdateContext } from './context' ;
@@ -190,7 +190,7 @@ export const UpdateProvider = ({
190190 return ;
191191 }
192192 const { downloadUrl } = info ;
193- if ( downloadUrl && Pushy . apkStatus === null ) {
193+ if ( downloadUrl && sharedState . apkStatus === null ) {
194194 if ( options . updateStrategy === 'silentAndNow' ) {
195195 if ( Platform . OS === 'android' && downloadUrl . endsWith ( '.apk' ) ) {
196196 downloadAndInstallApk ( downloadUrl ) ;
You can’t perform that action at this time.
0 commit comments