Skip to content

Commit 15867bc

Browse files
pocmomergify[bot]
authored andcommitted
PromptFeature: Only dismiss prompts with shouldDismissOnLoad flag set
1 parent de2d0c7 commit 15867bc

File tree

1 file changed

+4
-1
lines changed
  • components/feature/prompts/src/main/java/mozilla/components/feature/prompts

1 file changed

+4
-1
lines changed

components/feature/prompts/src/main/java/mozilla/components/feature/prompts/PromptFeature.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,10 @@ class PromptFeature private constructor(
757757
if (canShowThisPrompt(promptRequest)) {
758758
dialog.show(fragmentManager, FRAGMENT_TAG)
759759
activePrompt = WeakReference(dialog)
760-
activePromptsToDismiss.add(dialog)
760+
761+
if (promptRequest.shouldDismissOnLoad) {
762+
activePromptsToDismiss.add(dialog)
763+
}
761764
} else {
762765
(promptRequest as Dismissible).onDismiss()
763766
store.dispatch(ContentAction.ConsumePromptRequestAction(session.id, promptRequest))

0 commit comments

Comments
 (0)