You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tab swiping: Disable swiping on error views (#6055)
Task/Issue URL:
https://app.asana.com/1/137249556945/project/1202552961248957/task/1210226097518216?focus=true
### Description
This PR disables the swiping on the following views:
- Loading error view
- Malicious site protection view
- SSL error view
### Steps to test this PR
_Loading error view_
- [x] Enable flight mode
- [x] Start the app
- [x] Verify only the omnibar can swipe tabs, not the error content
_Malicious site error view_
- [x] Apply the patch below
```kotlin
Subject: [PATCH] Malicious site
---
Index: app/src/main/java/com/duckduckgo/app/browser/webview/MaliciousSiteBlockerWebViewIntegration.kt
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/app/src/main/java/com/duckduckgo/app/browser/webview/MaliciousSiteBlockerWebViewIntegration.kt b/app/src/main/java/com/duckduckgo/app/browser/webview/MaliciousSiteBlockerWebViewIntegration.kt
--- a/app/src/main/java/com/duckduckgo/app/browser/webview/MaliciousSiteBlockerWebViewIntegration.kt (revision e238a9d)
+++ b/app/src/main/java/com/duckduckgo/app/browser/webview/MaliciousSiteBlockerWebViewIntegration.kt (date 1747129357867)
@@ -32,6 +32,7 @@
import com.duckduckgo.di.scopes.AppScope
import com.duckduckgo.malicioussiteprotection.api.MaliciousSiteProtection
import com.duckduckgo.malicioussiteprotection.api.MaliciousSiteProtection.Feed
+import com.duckduckgo.malicioussiteprotection.api.MaliciousSiteProtection.Feed.MALWARE
import com.duckduckgo.malicioussiteprotection.api.MaliciousSiteProtection.IsMaliciousResult
import com.duckduckgo.malicioussiteprotection.api.MaliciousSiteProtection.IsMaliciousResult.ConfirmedResult
import com.duckduckgo.malicioussiteprotection.api.MaliciousSiteProtection.IsMaliciousResult.WaitForConfirmation
@@ -151,6 +152,7 @@
}
return withContext(dispatchers.io()) {
+ return@withContext IsMaliciousViewData.MaliciousSite(request.url, MALWARE, exempted = false, clientSideHit = true)
val belongsToCurrentPage = documentUri?.host == request.requestHeaders["Referer"]?.toUri()?.host
val isForIframe = (isForIframe(request) && belongsToCurrentPage)
```
- [x] Start the app
- [x] Verify only the omnibar can swipe tabs, not the error content
_SSL error view_
It's difficult to mock this error but it's the same custom view type as
malicious site error, so it uses the same approach.
0 commit comments