mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2026-11-16 00:44:04 +00:00
add SharedPreferencesKeyValueRepo
This commit is contained in:
1 parent
2ba5c97709
commit
7990b21cc5
2 files changed
+10
No files matched your search
@@ -2,6 +2,10 @@
|
||||
|
||||
## 0.10.5
|
||||
|
||||
* `Repos`
|
||||
* `Android`:
|
||||
* New function `SharedPreferencesKeyValueRepo`
|
||||
|
||||
## 0.10.4
|
||||
|
||||
* `Versions`:
|
||||
|
||||
@@ -160,3 +160,9 @@ class KeyValueStore<T : Any> internal constructor (
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
inline fun <T : Any> SharedPreferencesKeyValueRepo(
|
||||
context: Context,
|
||||
name: String = "default",
|
||||
cacheValues: Boolean = false
|
||||
) = context.keyValueStore<T>(name, cacheValues)
|
||||
Reference in new issue
Block a user