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,13 +469,15 @@ 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
addDocumentStartJavascriptPlugins.getPlugins().forEach { plugin ->
474
474
plugin.addDocumentStartJavaScript(webView)
475
475
}
476
476
477
- webMessagingPlugins.getPlugins().forEach { plugin ->
478
- plugin.register(callback, webView)
477
+ callback?.let {
478
+ webMessagingPlugins.getPlugins().forEach { plugin ->
479
+ plugin.register(callback, webView)
480
+ }
479
481
}
480
482
}
481
483
You can’t perform that action at this time.
0 commit comments