From 516f5cac649aa3244df10c38d78f4aeabbcdc72c Mon Sep 17 00:00:00 2001 From: Geoffrey Goh Date: Thu, 28 Jul 2016 14:40:47 -0700 Subject: [PATCH] Update CodePushDialog.java --- .../java/com/microsoft/codepush/react/CodePushDialog.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/android/app/src/main/java/com/microsoft/codepush/react/CodePushDialog.java b/android/app/src/main/java/com/microsoft/codepush/react/CodePushDialog.java index 8187658..81e643f 100644 --- a/android/app/src/main/java/com/microsoft/codepush/react/CodePushDialog.java +++ b/android/app/src/main/java/com/microsoft/codepush/react/CodePushDialog.java @@ -24,13 +24,10 @@ public class CodePushDialog extends ReactContextBaseJavaModule{ // 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() { - private boolean shown = false; - @Override public void onHostResume() { Activity currentActivity = getCurrentActivity(); - if (!shown && currentActivity != null) { - shown = true; + if (currentActivity != null) { getReactApplicationContext().removeLifecycleEventListener(this); showDialogInternal(title, message, button1Text, button2Text, successCallback, currentActivity); }