]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blobdiff - app/src/main/java/com/stoutner/privacybrowser/dialogs/ViewSslCertificateDialog.kt
Switch the FragmentPagerAdapters to FragmentStateAdapters. https://redmine.stoutner...
[PrivacyBrowserAndroid.git] / app / src / main / java / com / stoutner / privacybrowser / dialogs / ViewSslCertificateDialog.kt
index 3d572b5db42a2e3ad2e0d4112d19ef7ecfcf8177..98ad3fa56d959972164618485c2ee6d12991d4f9 100644 (file)
@@ -113,10 +113,10 @@ class ViewSslCertificateDialog : DialogFragment() {
         // Populate the class variables.
         if (savedInstanceState == null) {  // The dialog is starting for the first time.
             // Get the current position of this WebView fragment.
-            val webViewPosition = MainWebViewActivity.webViewPagerAdapter!!.getPositionForId(requireArguments().getLong(WEBVIEW_FRAGMENT_ID))
+            val webViewPosition = MainWebViewActivity.webViewStateAdapter!!.getPositionForId(requireArguments().getLong(WEBVIEW_FRAGMENT_ID))
 
             // 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()