File tree Expand file tree Collapse file tree 6 files changed +18
-14
lines changed
AndroidSDKCore/src/main/java/com/leanplum Expand file tree Collapse file tree 6 files changed +18
-14
lines changed Original file line number Diff line number Diff line change @@ -93,8 +93,8 @@ class LeanplumActions {
9393 */
9494 @JvmStatic
9595 fun setQueuePaused (paused : Boolean ) {
96- ActionManager .getInstance().isPaused = paused
9796 setContinueOnActivityResumed(! paused)
97+ ActionManager .getInstance().isPaused = paused
9898 }
9999
100100 /* *
Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ fun ActionManager.dismissCurrentAction() {
100100
101101@UiThread
102102private fun ActionManager.performActionsImpl () {
103- if (isPaused) return
103+ if (isPaused || ! isEnabled ) return
104104
105105 // do not continue if we have action running
106106 if (currentAction != null ) {
Original file line number Diff line number Diff line change @@ -57,7 +57,10 @@ public boolean present(@NonNull ActionContext context) {
5757
5858 CenterPopupOptions options = new CenterPopupOptions (context );
5959 popup = new CenterPopupController (activity , options );
60- popup .setOnDismissListener (listener -> popup = null );
60+ popup .setOnDismissListener (listener -> {
61+ popup = null ;
62+ context .actionDismissed ();
63+ });
6164 popup .show ();
6265
6366 return true ;
@@ -66,9 +69,7 @@ public boolean present(@NonNull ActionContext context) {
6669 @ Override
6770 public boolean dismiss (@ NonNull ActionContext context ) {
6871 if (popup != null ) {
69- popup .setOnDismissListener (listener -> context .actionDismissed ());
7072 popup .dismiss ();
71- popup = null ;
7273 }
7374 return true ;
7475 }
Original file line number Diff line number Diff line change @@ -57,7 +57,10 @@ public boolean present(@NonNull ActionContext context) {
5757
5858 InterstitialOptions options = new InterstitialOptions (context );
5959 interstitial = new InterstitialController (activity , options );
60- interstitial .setOnDismissListener (listener -> interstitial = null );
60+ interstitial .setOnDismissListener (listener -> {
61+ interstitial = null ;
62+ context .actionDismissed ();
63+ });
6164 interstitial .show ();
6265
6366 return true ;
@@ -66,9 +69,7 @@ public boolean present(@NonNull ActionContext context) {
6669 @ Override
6770 public boolean dismiss (@ NonNull ActionContext context ) {
6871 if (interstitial != null ) {
69- interstitial .setOnDismissListener (listener -> context .actionDismissed ());
7072 interstitial .dismiss ();
71- interstitial = null ;
7273 }
7374 return true ;
7475 }
Original file line number Diff line number Diff line change @@ -64,7 +64,10 @@ public boolean present(@NonNull ActionContext context) {
6464
6565 // Message is shown after html is rendered. Check handleOpenEvent(url) method.
6666 richHtml = new RichHtmlController (activity , richOptions );
67- richHtml .setOnDismissListener (listener -> richHtml = null );
67+ richHtml .setOnDismissListener (listener -> {
68+ richHtml = null ;
69+ context .actionDismissed ();
70+ });
6871 return true ;
6972
7073 } catch (Throwable t ) {
@@ -76,9 +79,7 @@ public boolean present(@NonNull ActionContext context) {
7679 @ Override
7780 public boolean dismiss (@ NonNull ActionContext context ) {
7881 if (richHtml != null ) {
79- richHtml .setOnDismissListener (listener -> context .actionDismissed ());
8082 richHtml .dismiss ();
81- richHtml = null ;
8283 }
8384 return true ;
8485 }
Original file line number Diff line number Diff line change @@ -57,7 +57,10 @@ public boolean present(@NonNull ActionContext context) {
5757
5858 WebInterstitialOptions options = new WebInterstitialOptions (context );
5959 webInterstitial = new WebInterstitialController (activity , options );
60- webInterstitial .setOnDismissListener (listener -> webInterstitial = null );
60+ webInterstitial .setOnDismissListener (listener -> {
61+ webInterstitial = null ;
62+ context .actionDismissed ();
63+ });
6164 webInterstitial .show ();
6265
6366 return true ;
@@ -66,9 +69,7 @@ public boolean present(@NonNull ActionContext context) {
6669 @ Override
6770 public boolean dismiss (@ NonNull ActionContext context ) {
6871 if (webInterstitial != null ) {
69- webInterstitial .setOnDismissListener (listener -> context .actionDismissed ());
7072 webInterstitial .dismiss ();
71- webInterstitial = null ;
7273 }
7374 return true ;
7475 }
You can’t perform that action at this time.
0 commit comments