Skip to content
Snippets Groups Projects
Verified Commit eb2f9e50 authored by Tara's avatar Tara Committed by ma1
Browse files

Bug 1908488 - Improve dialogs. r=android-reviewers,gmalekpour, a=dmeehan [bp]

parent 62d35a72
Branches
Tags
No related merge requests found
......@@ -9,6 +9,7 @@ import android.content.Intent
import androidx.annotation.VisibleForTesting
import androidx.annotation.VisibleForTesting.Companion.PRIVATE
import androidx.core.view.isVisible
import androidx.fragment.app.DialogFragment
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import kotlinx.coroutines.CoroutineScope
......@@ -1094,7 +1095,15 @@ class PromptFeature private constructor(
emitPromptDismissedFact(promptName = promptRequest::class.simpleName.ifNullOrEmpty { "" })
}
@VisibleForTesting
internal fun redirectDialogFragmentIsActive() =
(fragmentManager.findFragmentByTag("SHOULD_OPEN_APP_LINK_PROMPT_DIALOG") as? DialogFragment) != null
private fun canShowThisPrompt(promptRequest: PromptRequest): Boolean {
if (redirectDialogFragmentIsActive()) {
return false
}
return when (promptRequest) {
is SingleChoice,
is MultipleChoice,
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment