Commit 198d84c3 authored by Mygod's avatar Mygod

Fix turning on per-app not setting dirty flag

parent 4fd0140e
...@@ -81,10 +81,10 @@ class ProfileConfigFragment : PreferenceFragmentCompat(), ...@@ -81,10 +81,10 @@ class ProfileConfigFragment : PreferenceFragmentCompat(),
findPreference<Preference>(Key.ipv6)!!.isEnabled = serviceMode == Key.modeVpn findPreference<Preference>(Key.ipv6)!!.isEnabled = serviceMode == Key.modeVpn
isProxyApps = findPreference(Key.proxyApps)!! isProxyApps = findPreference(Key.proxyApps)!!
isProxyApps.isEnabled = serviceMode == Key.modeVpn isProxyApps.isEnabled = serviceMode == Key.modeVpn
isProxyApps.setOnPreferenceClickListener { isProxyApps.setOnPreferenceChangeListener { _, newValue ->
startActivity(Intent(activity, AppManager::class.java)) startActivity(Intent(activity, AppManager::class.java))
isProxyApps.isChecked = true if (newValue as Boolean) DataStore.dirty = true
false newValue
} }
findPreference<Preference>(Key.metered)!!.apply { findPreference<Preference>(Key.metered)!!.apply {
if (Build.VERSION.SDK_INT >= 28) isEnabled = serviceMode == Key.modeVpn else remove() if (Build.VERSION.SDK_INT >= 28) isEnabled = serviceMode == Key.modeVpn else remove()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment