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
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:
... | ... | @@ -11,8 +11,9 @@ class QuickstartViewModel( |
11 | 11 | application: Application,
|
12 | 12 | ) : AndroidViewModel(application) {
|
13 | 13 | |
14 | + private val components = getApplication<Application>().components
|
|
14 | 15 | private val torIntegrationAndroid =
|
15 | - (getApplication<Application>().components.core.engine as GeckoEngine).getTorIntegrationController()
|
|
16 | + (components.core.engine as GeckoEngine).getTorIntegrationController()
|
|
16 | 17 | |
17 | 18 | /**
|
18 | 19 | * NOTE: Whilst the initial value for _quickstart is fetched from
|
... | ... | @@ -25,10 +26,11 @@ class QuickstartViewModel( |
25 | 26 | init {
|
26 | 27 | torIntegrationAndroid.quickstartGet {
|
27 | 28 | _quickstart.value = it
|
29 | + components.settings.quickStart = it
|
|
28 | 30 | }
|
29 | 31 | }
|
30 | 32 | |
31 | - private val _quickstart = MutableLiveData<Boolean>()
|
|
33 | + private val _quickstart = MutableLiveData(components.settings.quickStart)
|
|
32 | 34 | fun quickstart(): LiveData<Boolean> {
|
33 | 35 | return _quickstart
|
34 | 36 | }
|
... | ... | @@ -36,6 +38,7 @@ class QuickstartViewModel( |
36 | 38 | fun quickstartSet(value: Boolean) {
|
37 | 39 | torIntegrationAndroid.quickstartSet(value)
|
38 | 40 | _quickstart.value = value
|
41 | + components.settings.quickStart = value
|
|
39 | 42 | }
|
40 | 43 | |
41 | 44 | } |
... | ... | @@ -2111,4 +2111,9 @@ class Settings(private val appContext: Context) : PreferencesHolder { |
2111 | 2111 | appContext.getPreferenceKey(R.string.pref_key_use_html_connection_ui),
|
2112 | 2112 | default = false,
|
2113 | 2113 | )
|
2114 | + |
|
2115 | + var quickStart by booleanPreference(
|
|
2116 | + appContext.getPreferenceKey(R.string.pref_key_quick_start),
|
|
2117 | + default = false,
|
|
2118 | + )
|
|
2114 | 2119 | } |