1
0
Fork 0

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

master
bswe 2019-10-03 12:03:52 -07:00
parent dcebd83e9f
commit 9913a024d8
1 changed files with 4 additions and 0 deletions

View File

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