TP-61032 | Codepush Range error crash fix (#10428)
This commit is contained in:
committed by
GitHub
parent
b43c40c733
commit
3cce2cd723
29
App.tsx
29
App.tsx
@@ -21,10 +21,29 @@ export default class App extends Component<{}> {
|
||||
getBuildConfigDetails().then((res) => {
|
||||
flavor = res?.baseUrl;
|
||||
});
|
||||
codePush.sync({
|
||||
installMode: codePush.InstallMode.ON_NEXT_RESUME,
|
||||
mandatoryInstallMode: codePush.InstallMode.IMMEDIATE,
|
||||
});
|
||||
codePush.sync(
|
||||
{
|
||||
installMode: codePush.InstallMode.IMMEDIATE,
|
||||
mandatoryInstallMode: codePush.InstallMode.IMMEDIATE,
|
||||
},
|
||||
(status) => {
|
||||
this.onCodepushStatusChange(status);
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
onCodepushStatusChange = (status: codePush.SyncStatus) => {
|
||||
switch (status) {
|
||||
case codePush.SyncStatus.UPDATE_IGNORED:
|
||||
logToSentry(
|
||||
`Codepush Ignored | Status: ${status} | MethodName: onCodepushStatusChange`
|
||||
);
|
||||
break;
|
||||
case codePush.SyncStatus.UNKNOWN_ERROR:
|
||||
logToSentry(
|
||||
`Codepush Failed | Status: ${status} | MethodName: onCodepushStatusChange`
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
getInitialCta = (): CtaData | undefined => {
|
||||
@@ -61,4 +80,4 @@ export default class App extends Component<{}> {
|
||||
// return error screen
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,8 @@
|
||||
"react-redux": "^8.1.2",
|
||||
"redux": "^4.2.1",
|
||||
"redux-persist": "^6.0.0",
|
||||
"redux-thunk": "^2.4.2"
|
||||
"redux-thunk": "^2.4.2",
|
||||
"whatwg-fetch": "3.6.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "^29.5.3",
|
||||
|
||||
Reference in New Issue
Block a user