[fenix] Issue https://github.com/mozilla-mobile/fenix/issues/5233: Added call to doesPrivateBrowsingPinnedShortcutExist function to determine whether the "add private browing shortcut" item is visible in the settings menu.

pull/600/head
bswe 5 years ago
parent ba7b54708b
commit d9bbb0a486

@ -132,6 +132,10 @@ class SettingsFragment : PreferenceFragmentCompat(), AccountObserver {
}
}
findPreference<Preference>(getPreferenceKey(R.string.pref_key_add_private_browsing_shortcut))?.apply {
isVisible = !PrivateShortcutCreateManager.doesPrivateBrowsingPinnedShortcutExist(requireContext())
}
setupPreferences()
updateAccountUIState(context!!, requireComponents.backgroundServices.accountManager.accountProfile())

Loading…
Cancel
Save