From 95b2ea5d21798530709905a6e49b3672cd652926 Mon Sep 17 00:00:00 2001 From: Emily Kager Date: Tue, 28 May 2019 13:17:32 -0700 Subject: [PATCH] [fenix] For https://github.com/mozilla-mobile/fenix/issues/2941 - Creates delete dialog style --- .../java/org/mozilla/fenix/home/HomeFragment.kt | 2 +- .../fenix/library/history/HistoryFragment.kt | 4 ++-- .../fenix/settings/DeleteBrowsingDataFragment.kt | 2 +- app/src/main/res/values/strings.xml | 2 ++ app/src/main/res/values/styles.xml | 13 +++++++++++++ 5 files changed, 19 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt b/app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt index 3166ead6c6..0ed9e4d4d6 100644 --- a/app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt +++ b/app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt @@ -376,7 +376,7 @@ class HomeFragment : Fragment(), CoroutineScope, AccountObserver { AlertDialog.Builder( ContextThemeWrapper( activity, - R.style.DialogStyle + R.style.DeleteDialogStyle ) ).apply { val message = context.getString(R.string.tab_collection_dialog_message, tabCollection.title) diff --git a/app/src/main/java/org/mozilla/fenix/library/history/HistoryFragment.kt b/app/src/main/java/org/mozilla/fenix/library/history/HistoryFragment.kt index 6bfa43af21..49eb0ad97e 100644 --- a/app/src/main/java/org/mozilla/fenix/library/history/HistoryFragment.kt +++ b/app/src/main/java/org/mozilla/fenix/library/history/HistoryFragment.kt @@ -142,14 +142,14 @@ class HistoryFragment : Fragment(), CoroutineScope, BackHandler { AlertDialog.Builder( ContextThemeWrapper( it, - R.style.DialogStyle + R.style.DeleteDialogStyle ) ).apply { setMessage(R.string.history_delete_all_dialog) setNegativeButton(android.R.string.cancel) { dialog: DialogInterface, _ -> dialog.cancel() } - setPositiveButton(android.R.string.ok) { dialog: DialogInterface, _ -> + setPositiveButton(R.string.history_clear_dialog) { dialog: DialogInterface, _ -> launch(Dispatchers.IO) { requireComponents.core.historyStorage.deleteEverything() reloadData() diff --git a/app/src/main/java/org/mozilla/fenix/settings/DeleteBrowsingDataFragment.kt b/app/src/main/java/org/mozilla/fenix/settings/DeleteBrowsingDataFragment.kt index f20fb3b99e..f59f0fe94e 100644 --- a/app/src/main/java/org/mozilla/fenix/settings/DeleteBrowsingDataFragment.kt +++ b/app/src/main/java/org/mozilla/fenix/settings/DeleteBrowsingDataFragment.kt @@ -112,7 +112,7 @@ class DeleteBrowsingDataFragment : Fragment(), CoroutineScope { AlertDialog.Builder( ContextThemeWrapper( activity, - R.style.DialogStyle + R.style.DeleteDialogStyle ) ).apply { val appName = context.getString(R.string.app_name) diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 45a041a42a..2cb78fbb30 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -333,6 +333,8 @@ Delete history Are you sure you want to clear your history? + + Clear Delete