]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blobdiff - app/src/main/java/com/stoutner/privacybrowser/dialogs/MoveToFolderDialog.kt
Release 3.8.1.
[PrivacyBrowserAndroid.git] / app / src / main / java / com / stoutner / privacybrowser / dialogs / MoveToFolderDialog.kt
index c7e7494e471dfe4755bacacedaa5a57d89d23baf..b35d31967f7fa488bfdc9b61b2b1158245be1336 100644 (file)
@@ -23,7 +23,6 @@ import android.annotation.SuppressLint
 import android.app.Dialog
 import android.content.Context
 import android.content.DialogInterface
-import android.content.res.Configuration
 import android.database.Cursor
 import android.database.DatabaseUtils
 import android.database.MatrixCursor
@@ -111,15 +110,8 @@ class MoveToFolderDialog : DialogFragment() {
         // Use an alert dialog builder to create the alert dialog.
         val dialogBuilder = AlertDialog.Builder(requireContext(), R.style.PrivacyBrowserAlertDialog)
 
-        // Get the current theme status.
-        val currentThemeStatus = resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK
-
         // Set the icon according to the theme.
-        if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
-            dialogBuilder.setIcon(R.drawable.move_to_folder_blue_day)
-        } else {
-            dialogBuilder.setIcon(R.drawable.move_to_folder_blue_night)
-        }
+        dialogBuilder.setIconAttribute(R.attr.moveToFolderBlueIcon)
 
         // Set the title.
         dialogBuilder.setTitle(R.string.move_to_folder)