]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blobdiff - app/src/main/java/com/stoutner/privacybrowser/dialogs/FontSizeDialog.kt
Convert five AsyncTasks to Kotlin. https://redmine.stoutner.com/issues/931
[PrivacyBrowserAndroid.git] / app / src / main / java / com / stoutner / privacybrowser / dialogs / FontSizeDialog.kt
index 8ca9c3a922077f5703925a3d74a2b68a75f66acc..a8167e3ec8fcbf5e72a2bd5a2f60cac9902e334c 100644 (file)
@@ -84,7 +84,7 @@ class FontSizeDialog : DialogFragment() {
         val dialogBuilder = AlertDialog.Builder(requireContext(), R.style.PrivacyBrowserAlertDialog)
 
         // Set the icon according to the theme.
-        dialogBuilder.setIconAttribute(R.attr.fontSizeBlueIcon)
+        dialogBuilder.setIcon(R.drawable.font_size)
 
         // Set the title.
         dialogBuilder.setTitle(R.string.font_size)
@@ -108,7 +108,7 @@ class FontSizeDialog : DialogFragment() {
         val dialogWindow = alertDialog.window!!
 
         // Get a handle for the shared preferences.
-        val sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context)
+        val sharedPreferences = PreferenceManager.getDefaultSharedPreferences(requireContext())
 
         // Get the screenshot preferences.
         val allowScreenshots = sharedPreferences.getBoolean(getString(R.string.allow_screenshots_key), false)