From d10ed72be9bfbc41492cbafaba45b4f5c49daee1 Mon Sep 17 00:00:00 2001 From: Gabriel Luong Date: Thu, 14 Apr 2022 00:50:21 -0400 Subject: [PATCH] [fenix] For https://github.com/mozilla-mobile/fenix/issues/24780 - Part 3: Show the correct toolbar title if address autofill is enabled --- .../fenix/settings/creditcards/AutofillSettingFragment.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/mozilla/fenix/settings/creditcards/AutofillSettingFragment.kt b/app/src/main/java/org/mozilla/fenix/settings/creditcards/AutofillSettingFragment.kt index 08b6f94dd7..c1a77c6286 100644 --- a/app/src/main/java/org/mozilla/fenix/settings/creditcards/AutofillSettingFragment.kt +++ b/app/src/main/java/org/mozilla/fenix/settings/creditcards/AutofillSettingFragment.kt @@ -113,7 +113,11 @@ class AutofillSettingFragment : BiometricPromptPreferenceFragment() { override fun onResume() { super.onResume() - showToolbar(getString(R.string.preferences_credit_cards)) + if (requireComponents.settings.addressFeature) { + showToolbar(getString(R.string.preferences_autofill)) + } else { + showToolbar(getString(R.string.preferences_credit_cards)) + } SyncPreferenceView( syncPreference = requirePreference(R.string.pref_key_credit_cards_sync_cards_across_devices),