]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blobdiff - app/src/main/java/com/stoutner/privacybrowser/dialogs/PinnedMismatchDialog.kt
Convert the views and data classes to Kotlin. https://redmine.stoutner.com/issues/744
[PrivacyBrowserAndroid.git] / app / src / main / java / com / stoutner / privacybrowser / dialogs / PinnedMismatchDialog.kt
index 8c1288f62888079910813734b7812148020c0cfc..d4ba4a74d9a8fe1a54378ee891c39f8df180fca2 100644 (file)
@@ -105,7 +105,7 @@ class PinnedMismatchDialog : DialogFragment() {
         val dialogBuilder = AlertDialog.Builder(requireContext(), R.style.PrivacyBrowserAlertDialog)
 
         // Get the favorite icon.
-        val favoriteIconBitmap = nestedScrollWebView.favoriteOrDefaultIcon
+        val favoriteIconBitmap = nestedScrollWebView.getFavoriteOrDefaultIcon()
 
         // Get the default favorite icon drawable.  `ContextCompat` must be used until API >= 21.
         val defaultFavoriteIconDrawable = ContextCompat.getDrawable(requireContext(), R.drawable.world)
@@ -163,7 +163,7 @@ class PinnedMismatchDialog : DialogFragment() {
             }
 
             // Update the IP addresses if they are pinned.
-            if (nestedScrollWebView.hasPinnedIpAddresses()) {
+            if (!nestedScrollWebView.pinnedIpAddresses.equals("")) {
                 // Update the pinned IP addresses in the domain database.
                 domainsDatabaseHelper.updatePinnedIpAddresses(nestedScrollWebView.domainSettingsDatabaseId, nestedScrollWebView. currentIpAddresses)
 
@@ -186,7 +186,7 @@ class PinnedMismatchDialog : DialogFragment() {
         // Set the proceed button listener.
         dialogBuilder.setPositiveButton(R.string.proceed) { _: DialogInterface?, _: Int ->
             // Do not check the pinned information for this domain again until the domain changes.
-            nestedScrollWebView.setIgnorePinnedDomainInformation(true)
+            nestedScrollWebView.ignorePinnedDomainInformation = true
         }
 
         // Create an alert dialog from the alert dialog builder.