Dan Ballard pushed to branch tor-browser-128.8.0esr-14.5-1 at The Tor Project / Applications / Tor Browser
Commits: cbe2d643 by clairehurst at 2025-03-10T15:28:34+00:00 fixup! [android] Implement Android-native Connection Assist UI
tor-browser!43408 Add pref to load quickstartUI faster
- - - - -
2 changed files:
- mobile/android/fenix/app/src/main/java/org/mozilla/fenix/tor/QuickstartViewModel.kt - mobile/android/fenix/app/src/main/java/org/mozilla/fenix/utils/Settings.kt
Changes:
===================================== mobile/android/fenix/app/src/main/java/org/mozilla/fenix/tor/QuickstartViewModel.kt ===================================== @@ -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 }
}
===================================== mobile/android/fenix/app/src/main/java/org/mozilla/fenix/utils/Settings.kt ===================================== @@ -2111,4 +2111,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, + ) }
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/cbe2d643...
tbb-commits@lists.torproject.org