Skip to content
Snippets Groups Projects
Commit cd045c42 authored by Tara's avatar Tara Committed by Pier Angelo Vendrame
Browse files

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

parent 45052120
Branches
Tags
1 merge request!1462BB/TB 43584: Rebased stable again onto 128.9.0esr build2
......@@ -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