X-Git-Url: https://gitweb.stoutner.com/?a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjava%2Fcom%2Fstoutner%2Fprivacybrowser%2Fdialogs%2FSslCertificateErrorDialog.kt;h=aa0ae90856ef798a1eb75f9a0c411f6eacff2ca4;hb=5dd60cebd26469bcc597e1ccede8706fb403dfc1;hp=e0b27230ca25f59e97e6bcd08bf37a495a01aead;hpb=12042264a50769030361cf51b0ac197050209f0f;p=PrivacyBrowserAndroid.git diff --git a/app/src/main/java/com/stoutner/privacybrowser/dialogs/SslCertificateErrorDialog.kt b/app/src/main/java/com/stoutner/privacybrowser/dialogs/SslCertificateErrorDialog.kt index e0b27230..aa0ae908 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/dialogs/SslCertificateErrorDialog.kt +++ b/app/src/main/java/com/stoutner/privacybrowser/dialogs/SslCertificateErrorDialog.kt @@ -56,8 +56,6 @@ private const val WEBVIEW_FRAGMENT_ID = "webview_fragment_id" class SslCertificateErrorDialog : DialogFragment() { companion object { - // `@JvmStatic` will no longer be required once all the code has transitioned to Kotlin. - @JvmStatic fun displayDialog(sslError: SslError, webViewFragmentId: Long): SslCertificateErrorDialog { // Get the various components of the SSL error message. val primaryErrorInt = sslError.primaryError @@ -114,10 +112,10 @@ class SslCertificateErrorDialog : DialogFragment() { val webViewFragmentId = requireArguments().getLong(WEBVIEW_FRAGMENT_ID) // Get the current position of this WebView fragment. - val webViewPosition = MainWebViewActivity.webViewPagerAdapter.getPositionForId(webViewFragmentId) + val webViewPosition = MainWebViewActivity.webViewStateAdapter!!.getPositionForId(webViewFragmentId) // Get the WebView tab fragment. - val webViewTabFragment = MainWebViewActivity.webViewPagerAdapter.getPageFragment(webViewPosition) + val webViewTabFragment = MainWebViewActivity.webViewStateAdapter!!.getPageFragment(webViewPosition) // Get the fragment view. val fragmentView = webViewTabFragment.requireView()