Issue #5233: Added call to doesPrivateBrowsingPinnedShortcutExist function to determine whether the "add private browing shortcut" item is visible in the settings menu.

nightly-build-test
bswe 5 years ago
parent dcebd83e9f
commit 9913a024d8

@ -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