Skip to content

Commit

Permalink
Fixed app crash caused by BadTokenException. (microsoft#1287)
Browse files Browse the repository at this point in the history
  • Loading branch information
NickToropov authored and alexandergoncharov-zz committed May 24, 2018
1 parent 163e2b5 commit 21f8388
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public CodePushDialog(ReactApplicationContext reactContext) {
public void showDialog(final String title, final String message, final String button1Text,
final String button2Text, final Callback successCallback, Callback errorCallback) {
Activity currentActivity = getCurrentActivity();
if (currentActivity == null) {
if (currentActivity == null || currentActivity.isFinishing()) {
// If getCurrentActivity is null, it could be because the app is backgrounded,
// so we show the dialog when the app resumes)
getReactApplicationContext().addLifecycleEventListener(new LifecycleEventListener() {
Expand Down

0 comments on commit 21f8388

Please sign in to comment.