|
|
|
@ -877,8 +877,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
|
|
|
|
|
|
|
|
|
|
var shouldUseBottomToolbar by booleanPreference(
|
|
|
|
|
appContext.getPreferenceKey(R.string.pref_key_toolbar_bottom),
|
|
|
|
|
// Default accessibility users to top toolbar
|
|
|
|
|
default = !touchExplorationIsEnabled && !switchServiceIsEnabled,
|
|
|
|
|
default = shouldDefaultToBottomToolbar(),
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
val toolbarPosition: ToolbarPosition
|
|
|
|
@ -916,6 +915,18 @@ class Settings(private val appContext: Context) : PreferencesHolder {
|
|
|
|
|
return touchExplorationIsEnabled || switchServiceIsEnabled
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val toolbarPositionTop: Boolean
|
|
|
|
|
get() = FxNimbus.features.toolbar.value().toolbarPositionTop
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Checks if we should default to bottom toolbar.
|
|
|
|
|
*/
|
|
|
|
|
fun shouldDefaultToBottomToolbar(): Boolean {
|
|
|
|
|
// Default accessibility users to top toolbar
|
|
|
|
|
return (!touchExplorationIsEnabled && !switchServiceIsEnabled) &&
|
|
|
|
|
!toolbarPositionTop
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fun getDeleteDataOnQuit(type: DeleteBrowsingDataOnQuitType): Boolean =
|
|
|
|
|
preferences.getBoolean(type.getPreferenceKey(appContext), false)
|
|
|
|
|
|
|
|
|
|