From 788e52be0ced75c1b17a4605ab2e5b424378c77c Mon Sep 17 00:00:00 2001 From: mcarare Date: Wed, 9 Oct 2019 11:55:37 +0300 Subject: [PATCH] For #5873 Added on/off indicator for delete browsing data on exit pref --- .../org/mozilla/fenix/settings/SettingsFragment.kt | 10 ++++++++++ app/src/main/res/values/strings.xml | 4 ++++ 2 files changed, 14 insertions(+) diff --git a/app/src/main/java/org/mozilla/fenix/settings/SettingsFragment.kt b/app/src/main/java/org/mozilla/fenix/settings/SettingsFragment.kt index 0c6e452ac..4e4ece24a 100644 --- a/app/src/main/java/org/mozilla/fenix/settings/SettingsFragment.kt +++ b/app/src/main/java/org/mozilla/fenix/settings/SettingsFragment.kt @@ -129,6 +129,16 @@ class SettingsFragment : PreferenceFragmentCompat(), AccountObserver { val appName = getString(R.string.app_name) aboutPreference?.title = getString(R.string.preferences_about, appName) + val deleteBrowsingDataPreference = + findPreference(getPreferenceKey(R.string.pref_key_delete_browsing_data_on_quit_preference)) + deleteBrowsingDataPreference?.summary = context?.let { + if (it.settings().shouldDeleteBrowsingDataOnQuit) { + getString(R.string.delete_browsing_data_quit_on) + } else { + getString(R.string.delete_browsing_data_quit_off) + } + } + setupPreferences() updateAccountUIState(context!!, requireComponents.backgroundServices.accountManager.accountProfile()) diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 326f4e0e3..c396daad3 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -539,6 +539,10 @@ Video and audio blocked Video and audio allowed + + On + + Off