Last UseKtx: the encrypted-prefs delegate uses prefs.edit{} too
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
80c8c4788a
commit
aca0839e0f
1 changed files with 2 additions and 2 deletions
|
|
@ -77,9 +77,9 @@ class SettingsStore(context: Context) {
|
|||
prefs.getString(prefKey, null)?.let { decrypt(it) }
|
||||
|
||||
override fun setValue(thisRef: Any?, property: kotlin.reflect.KProperty<*>, value: String?) {
|
||||
prefs.edit().apply {
|
||||
prefs.edit {
|
||||
if (value == null) remove(prefKey) else putString(prefKey, encrypt(value))
|
||||
}.apply()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue