X-Git-Url: https://gitweb.stoutner.com/?a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjava%2Fcom%2Fstoutner%2Fprivacybrowser%2Fdialogs%2FSaveWebpageDialog.kt;h=782526d0f761ed94adc7877978f2717c5aa404a1;hb=725e4a525bed43f46e24ecc97eafcc339a48939c;hp=b27e1703b6537b04022560eada2122b9f4556f6d;hpb=031def95c6d9bfc14113fe86b4a5690233d93ce2;p=PrivacyBrowserAndroid.git diff --git a/app/src/main/java/com/stoutner/privacybrowser/dialogs/SaveWebpageDialog.kt b/app/src/main/java/com/stoutner/privacybrowser/dialogs/SaveWebpageDialog.kt index b27e1703..782526d0 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/dialogs/SaveWebpageDialog.kt +++ b/app/src/main/java/com/stoutner/privacybrowser/dialogs/SaveWebpageDialog.kt @@ -77,7 +77,8 @@ class SaveWebpageDialog : DialogFragment() { companion object { // Define the companion object constants. These can be moved to class constants once all of the code has transitioned to Kotlin. const val SAVE_URL = 0 - const val SAVE_IMAGE = 1 + const val SAVE_ARCHIVE = 1 + const val SAVE_IMAGE = 2 // `@JvmStatic` will no longer be required once all the code has transitioned to Kotlin. @JvmStatic @@ -135,6 +136,18 @@ class SaveWebpageDialog : DialogFragment() { } } + SAVE_ARCHIVE -> { + // Set the title. + dialogBuilder.setTitle(R.string.save_archive) + + // Set the icon according to the theme. + if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { + dialogBuilder.setIcon(R.drawable.dom_storage_cleared_day) + } else { + dialogBuilder.setIcon(R.drawable.dom_storage_cleared_night) + } + } + SAVE_IMAGE -> { // Set the title. dialogBuilder.setTitle(R.string.save_image)