diff --git a/app/src/main/java/com/duckduckgo/app/brokensite/BrokenSiteViewModel.kt b/app/src/main/java/com/duckduckgo/app/brokensite/BrokenSiteViewModel.kt index 5f4b44d3f02b..aa90ac696ffc 100644 --- a/app/src/main/java/com/duckduckgo/app/brokensite/BrokenSiteViewModel.kt +++ b/app/src/main/java/com/duckduckgo/app/brokensite/BrokenSiteViewModel.kt @@ -38,7 +38,7 @@ import com.duckduckgo.brokensite.api.ReportFlow as BrokenSiteModelReportFlow import com.duckduckgo.browser.api.brokensite.BrokenSiteData.ReportFlow import com.duckduckgo.browser.api.brokensite.BrokenSiteData.ReportFlow.DASHBOARD import com.duckduckgo.browser.api.brokensite.BrokenSiteData.ReportFlow.MENU -import com.duckduckgo.browser.api.brokensite.BrokenSiteData.ReportFlow.PROMPT +import com.duckduckgo.browser.api.brokensite.BrokenSiteData.ReportFlow.RELOAD_THREE_TIMES_WITHIN_20_SECONDS import com.duckduckgo.browser.api.brokensite.BrokenSiteData.ReportFlow.TOGGLE_DASHBOARD import com.duckduckgo.browser.api.brokensite.BrokenSiteData.ReportFlow.TOGGLE_MENU import com.duckduckgo.browser.api.brokensite.BrokenSiteOpenerContext @@ -288,7 +288,7 @@ private fun MutableLiveData.setProtectionsState(state: SiteProtection private fun ReportFlow.mapToBrokenSiteModelReportFlow(): BrokenSiteModelReportFlow = when (this) { MENU -> BrokenSiteModelReportFlow.MENU DASHBOARD -> BrokenSiteModelReportFlow.DASHBOARD - PROMPT -> BrokenSiteModelReportFlow.PROMPT + RELOAD_THREE_TIMES_WITHIN_20_SECONDS -> BrokenSiteModelReportFlow.RELOAD_THREE_TIMES_WITHIN_20_SECONDS TOGGLE_MENU -> BrokenSiteModelReportFlow.TOGGLE_MENU TOGGLE_DASHBOARD -> BrokenSiteModelReportFlow.TOGGLE_DASHBOARD } diff --git a/app/src/main/java/com/duckduckgo/app/brokensite/api/BrokenSiteSender.kt b/app/src/main/java/com/duckduckgo/app/brokensite/api/BrokenSiteSender.kt index 45fc6655c40e..e72bfbbe8b1a 100644 --- a/app/src/main/java/com/duckduckgo/app/brokensite/api/BrokenSiteSender.kt +++ b/app/src/main/java/com/duckduckgo/app/brokensite/api/BrokenSiteSender.kt @@ -32,7 +32,7 @@ import com.duckduckgo.brokensite.api.BrokenSiteSender import com.duckduckgo.brokensite.api.ReportFlow import com.duckduckgo.brokensite.api.ReportFlow.DASHBOARD import com.duckduckgo.brokensite.api.ReportFlow.MENU -import com.duckduckgo.brokensite.api.ReportFlow.PROMPT +import com.duckduckgo.brokensite.api.ReportFlow.RELOAD_THREE_TIMES_WITHIN_20_SECONDS import com.duckduckgo.brokensite.api.ReportFlow.TOGGLE_DASHBOARD import com.duckduckgo.brokensite.api.ReportFlow.TOGGLE_MENU import com.duckduckgo.browser.api.WebViewVersionProvider @@ -231,7 +231,7 @@ class BrokenSiteSubmitter @Inject constructor( private fun ReportFlow.toStringValue(): String = when (this) { DASHBOARD -> "dashboard" MENU -> "menu" - PROMPT -> "prompt" TOGGLE_DASHBOARD -> "on_protections_off_dashboard_main" TOGGLE_MENU -> "on_protections_off_menu" + RELOAD_THREE_TIMES_WITHIN_20_SECONDS -> "reload-three-times-within-20-seconds" } diff --git a/app/src/main/java/com/duckduckgo/app/browser/BrowserTabFragment.kt b/app/src/main/java/com/duckduckgo/app/browser/BrowserTabFragment.kt index c797e0f44d24..55c46af6db1b 100644 --- a/app/src/main/java/com/duckduckgo/app/browser/BrowserTabFragment.kt +++ b/app/src/main/java/com/duckduckgo/app/browser/BrowserTabFragment.kt @@ -225,7 +225,7 @@ import com.duckduckgo.autofill.api.domain.app.LoginTriggerType import com.duckduckgo.autofill.api.emailprotection.EmailInjector import com.duckduckgo.browser.api.WebViewVersionProvider import com.duckduckgo.browser.api.brokensite.BrokenSiteData -import com.duckduckgo.browser.api.brokensite.BrokenSiteData.ReportFlow.PROMPT +import com.duckduckgo.browser.api.brokensite.BrokenSiteData.ReportFlow.RELOAD_THREE_TIMES_WITHIN_20_SECONDS import com.duckduckgo.common.ui.DuckDuckGoFragment import com.duckduckgo.common.ui.store.BrowserAppTheme import com.duckduckgo.common.ui.view.DaxDialog @@ -1921,7 +1921,7 @@ class BrowserTabFragment : if (webBrokenSiteForm.shouldUseWebBrokenSiteForm()) { val reportFlow = when (data.reportFlow) { - PROMPT -> BrokenSiteFormReportFlow.PROMPT + RELOAD_THREE_TIMES_WITHIN_20_SECONDS -> BrokenSiteFormReportFlow.PROMPT else -> BrokenSiteFormReportFlow.MENU } globalActivityStarter.startIntent(context, BrokenSiteForm(tabId = tabId, reportFlow = reportFlow)) diff --git a/app/src/main/java/com/duckduckgo/app/browser/BrowserTabViewModel.kt b/app/src/main/java/com/duckduckgo/app/browser/BrowserTabViewModel.kt index f5fe3c665511..7b75ddf6853a 100644 --- a/app/src/main/java/com/duckduckgo/app/browser/BrowserTabViewModel.kt +++ b/app/src/main/java/com/duckduckgo/app/browser/BrowserTabViewModel.kt @@ -260,7 +260,7 @@ import com.duckduckgo.brokensite.api.BrokenSitePrompt import com.duckduckgo.browser.api.UserBrowserProperties import com.duckduckgo.browser.api.brokensite.BrokenSiteData import com.duckduckgo.browser.api.brokensite.BrokenSiteData.ReportFlow.MENU -import com.duckduckgo.browser.api.brokensite.BrokenSiteData.ReportFlow.PROMPT +import com.duckduckgo.browser.api.brokensite.BrokenSiteData.ReportFlow.RELOAD_THREE_TIMES_WITHIN_20_SECONDS import com.duckduckgo.common.utils.AppUrl import com.duckduckgo.common.utils.ConflatedJob import com.duckduckgo.common.utils.DispatcherProvider @@ -3484,7 +3484,7 @@ class BrowserTabViewModel @Inject constructor( private fun onBrokenSiteCtaOkButtonClicked(cta: BrokenSitePromptDialogCta): Command? { viewModelScope.launch { - command.value = BrokenSiteFeedback(BrokenSiteData.fromSite(site, reportFlow = PROMPT)) + command.value = BrokenSiteFeedback(BrokenSiteData.fromSite(site, reportFlow = RELOAD_THREE_TIMES_WITHIN_20_SECONDS)) command.value = HideBrokenSitePromptCta(cta) } return null diff --git a/broken-site/broken-site-api/src/main/java/com/duckduckgo/brokensite/api/BrokenSiteSender.kt b/broken-site/broken-site-api/src/main/java/com/duckduckgo/brokensite/api/BrokenSiteSender.kt index 74b3dee573a5..07eee6a44ba7 100644 --- a/broken-site/broken-site-api/src/main/java/com/duckduckgo/brokensite/api/BrokenSiteSender.kt +++ b/broken-site/broken-site-api/src/main/java/com/duckduckgo/brokensite/api/BrokenSiteSender.kt @@ -41,4 +41,4 @@ data class BrokenSite( val jsPerformance: List?, ) -enum class ReportFlow { DASHBOARD, MENU, PROMPT, TOGGLE_DASHBOARD, TOGGLE_MENU } +enum class ReportFlow { DASHBOARD, MENU, TOGGLE_DASHBOARD, TOGGLE_MENU, RELOAD_THREE_TIMES_WITHIN_20_SECONDS } diff --git a/browser-api/src/main/java/com/duckduckgo/browser/api/brokensite/BrokenSiteNav.kt b/browser-api/src/main/java/com/duckduckgo/browser/api/brokensite/BrokenSiteNav.kt index 8f6275649c7c..42c6ab6831cc 100644 --- a/browser-api/src/main/java/com/duckduckgo/browser/api/brokensite/BrokenSiteNav.kt +++ b/browser-api/src/main/java/com/duckduckgo/browser/api/brokensite/BrokenSiteNav.kt @@ -44,7 +44,7 @@ data class BrokenSiteData( val openerContext: BrokenSiteOpenerContext?, val jsPerformance: DoubleArray?, ) { - enum class ReportFlow { MENU, DASHBOARD, PROMPT, TOGGLE_DASHBOARD, TOGGLE_MENU } + enum class ReportFlow { MENU, DASHBOARD, TOGGLE_DASHBOARD, TOGGLE_MENU, RELOAD_THREE_TIMES_WITHIN_20_SECONDS } companion object { fun fromSite(site: Site?, reportFlow: ReportFlow): BrokenSiteData { diff --git a/privacy-dashboard/privacy-dashboard-impl/src/main/java/com/duckduckgo/privacy/dashboard/impl/ui/PrivacyDashboardHybridActivity.kt b/privacy-dashboard/privacy-dashboard-impl/src/main/java/com/duckduckgo/privacy/dashboard/impl/ui/PrivacyDashboardHybridActivity.kt index fb39fbad5397..385186fdb680 100644 --- a/privacy-dashboard/privacy-dashboard-impl/src/main/java/com/duckduckgo/privacy/dashboard/impl/ui/PrivacyDashboardHybridActivity.kt +++ b/privacy-dashboard/privacy-dashboard-impl/src/main/java/com/duckduckgo/privacy/dashboard/impl/ui/PrivacyDashboardHybridActivity.kt @@ -109,7 +109,7 @@ class PrivacyDashboardHybridActivity : DuckDuckGoActivity() { is BrokenSiteForm -> { when (params.reportFlow) { BrokenSiteForm.BrokenSiteFormReportFlow.MENU -> ReportFlow.MENU - BrokenSiteForm.BrokenSiteFormReportFlow.PROMPT -> ReportFlow.PROMPT + BrokenSiteForm.BrokenSiteFormReportFlow.PROMPT -> ReportFlow.RELOAD_THREE_TIMES_WITHIN_20_SECONDS } } else -> ReportFlow.DASHBOARD