Skip to content
Snippets Groups Projects
Commit 4592d997 authored by clairehurst's avatar clairehurst Committed by Pier Angelo Vendrame
Browse files

fixup! [android] Implement Android-native Connection Assist UI

tor-browser!43408 Add pref to load quickstartUI faster
parent 49f24030
Branches
Tags
1 merge request!1500TB 43415: Rebased onto 134.0a1
......@@ -11,8 +11,9 @@ class QuickstartViewModel(
application: Application,
) : AndroidViewModel(application) {
private val components = getApplication<Application>().components
private val torIntegrationAndroid =
(getApplication<Application>().components.core.engine as GeckoEngine).getTorIntegrationController()
(components.core.engine as GeckoEngine).getTorIntegrationController()
/**
* NOTE: Whilst the initial value for _quickstart is fetched from
......@@ -25,10 +26,11 @@ class QuickstartViewModel(
init {
torIntegrationAndroid.quickstartGet {
_quickstart.value = it
components.settings.quickStart = it
}
}
private val _quickstart = MutableLiveData<Boolean>()
private val _quickstart = MutableLiveData(components.settings.quickStart)
fun quickstart(): LiveData<Boolean> {
return _quickstart
}
......@@ -36,6 +38,7 @@ class QuickstartViewModel(
fun quickstartSet(value: Boolean) {
torIntegrationAndroid.quickstartSet(value)
_quickstart.value = value
components.settings.quickStart = value
}
}
......@@ -2291,4 +2291,9 @@ class Settings(private val appContext: Context) : PreferencesHolder {
appContext.getPreferenceKey(R.string.pref_key_use_html_connection_ui),
default = false,
)
var quickStart by booleanPreference(
appContext.getPreferenceKey(R.string.pref_key_quick_start),
default = false,
)
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment