Added PREF_FRAGMENT_* to SettingsViewModel.kt

This commit is contained in:
Vahid Farid committed 2024-02-13 16:44:17 +03:30
1 parent 0d77a65bbb
commit 32741ed7ab
1 file changed
+4
@@ -41,6 +41,9 @@ class SettingsViewModel(application: Application) : AndroidViewModel(application
AppConfig.PREF_V2RAY_ROUTING_BLOCKED,
AppConfig.PREF_V2RAY_ROUTING_DIRECT,
AppConfig.SUBSCRIPTION_AUTO_UPDATE_INTERVAL,
AppConfig.PREF_FRAGMENT_PACKETS,
AppConfig.PREF_FRAGMENT_LENGTH,
AppConfig.PREF_FRAGMENT_INTERVAL,
AppConfig.PREF_MUX_XUDP_QUIC, -> {
settingsStorage?.encode(key, sharedPreferences.getString(key, ""))
}
@@ -55,6 +58,7 @@ class SettingsViewModel(application: Application) : AndroidViewModel(application
AppConfig.PREF_CONFIRM_REMOVE,
AppConfig.PREF_START_SCAN_IMMEDIATE,
AppConfig.SUBSCRIPTION_AUTO_UPDATE,
AppConfig.PREF_FRAGMENT_ENABLED,
AppConfig.PREF_MUX_ENABLED, -> {
settingsStorage?.encode(key, sharedPreferences.getBoolean(key, false))
}