File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed
app/src/main/java/com/duckduckgo/app/browser Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -1935,11 +1935,17 @@ class BrowserTabFragment :
1935
1935
is Command .ShowFireproofWebSiteConfirmation -> fireproofWebsiteConfirmation(it.fireproofWebsiteEntity)
1936
1936
is Command .DeleteFireproofConfirmation -> removeFireproofWebsiteConfirmation(it.fireproofWebsiteEntity)
1937
1937
is Command .RefreshAndShowPrivacyProtectionEnabledConfirmation -> {
1938
+ webView?.let {
1939
+ webViewClient.configureWebView(it, null )
1940
+ }
1938
1941
refresh()
1939
1942
privacyProtectionEnabledConfirmation(it.domain)
1940
1943
}
1941
1944
1942
1945
is Command .RefreshAndShowPrivacyProtectionDisabledConfirmation -> {
1946
+ webView?.let {
1947
+ webViewClient.configureWebView(it, null )
1948
+ }
1943
1949
refresh()
1944
1950
privacyProtectionDisabledConfirmation(it.domain)
1945
1951
}
Original file line number Diff line number Diff line change @@ -469,15 +469,17 @@ class BrowserWebViewClient @Inject constructor(
469
469
webView.settings.mediaPlaybackRequiresUserGesture = mediaPlayback.doesMediaPlaybackRequireUserGestureForUrl(url)
470
470
}
471
471
472
- fun configureWebView (webView : DuckDuckGoWebView , callback : WebViewCompatMessageCallback ) {
472
+ fun configureWebView (webView : DuckDuckGoWebView , callback : WebViewCompatMessageCallback ? ) {
473
473
appCoroutineScope.launch {
474
474
val activeExperiments = contentScopeExperiments.getActiveExperiments()
475
475
addDocumentStartJavascriptPlugins.getPlugins().forEach { plugin ->
476
476
plugin.addDocumentStartJavaScript(activeExperiments, webView)
477
477
}
478
478
479
- webMessagingPlugins.getPlugins().forEach { plugin ->
480
- plugin.register(callback, webView)
479
+ callback?.let {
480
+ webMessagingPlugins.getPlugins().forEach { plugin ->
481
+ plugin.register(callback, webView)
482
+ }
481
483
}
482
484
}
483
485
}
You can’t perform that action at this time.
0 commit comments