diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e95dee88c5..0fd9051529f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## 0.10.5 +* `Repos` + * `Android`: + * New function `SharedPreferencesKeyValueRepo` + ## 0.10.4 * `Versions`: diff --git a/repos/common/src/main/kotlin/dev/inmo/micro_utils/repos/keyvalue/KeyValueStore.kt b/repos/common/src/main/kotlin/dev/inmo/micro_utils/repos/keyvalue/KeyValueStore.kt index bc863224c42..440490f51ea 100644 --- a/repos/common/src/main/kotlin/dev/inmo/micro_utils/repos/keyvalue/KeyValueStore.kt +++ b/repos/common/src/main/kotlin/dev/inmo/micro_utils/repos/keyvalue/KeyValueStore.kt @@ -160,3 +160,9 @@ class KeyValueStore internal constructor ( } } } + +inline fun SharedPreferencesKeyValueRepo( + context: Context, + name: String = "default", + cacheValues: Boolean = false +) = context.keyValueStore(name, cacheValues)