]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blobdiff - app/src/main/java/com/stoutner/privacybrowser/dialogs/SaveDialog.kt
Convert the flavor specific Java classes to Kotlin. https://redmine.stoutner.com...
[PrivacyBrowserAndroid.git] / app / src / main / java / com / stoutner / privacybrowser / dialogs / SaveDialog.kt
index 312ebd05936fa52f50124f7fc075ae58cb3017a8..317e05b8c3ef67977bf5cab692a6ec16cfa13e1c 100644 (file)
@@ -104,11 +104,7 @@ class SaveDialog : DialogFragment() {
                 dialogBuilder.setTitle(R.string.save_logcat)
 
                 // Set the icon according to the theme.
-                if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
-                    dialogBuilder.setIcon(R.drawable.save_dialog_day)
-                } else {
-                    dialogBuilder.setIcon(R.drawable.save_dialog_night)
-                }
+                dialogBuilder.setIconAttribute(R.attr.saveBlueIcon)
             }
 
             SAVE_ABOUT_VERSION_TEXT -> {
@@ -116,11 +112,7 @@ class SaveDialog : DialogFragment() {
                 dialogBuilder.setTitle(R.string.save_text)
 
                 // Set the icon according to the theme.
-                if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
-                    dialogBuilder.setIcon(R.drawable.save_text_blue_day)
-                } else {
-                    dialogBuilder.setIcon(R.drawable.save_text_blue_night)
-                }
+                dialogBuilder.setIconAttribute(R.attr.saveTextBlueIcon)
             }
 
             SAVE_ABOUT_VERSION_IMAGE -> {
@@ -128,11 +120,7 @@ class SaveDialog : DialogFragment() {
                 dialogBuilder.setTitle(R.string.save_image)
 
                 // Set the icon according to the theme.
-                if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
-                    dialogBuilder.setIcon(R.drawable.images_enabled_day)
-                } else {
-                    dialogBuilder.setIcon(R.drawable.images_enabled_night)
-                }
+                dialogBuilder.setIconAttribute(R.attr.imagesBlueIcon)
             }
         }