Releases: afollestad/rxkprefs
Releases 路 afollestad/rxkprefs
2.0.1
- Dependency upgrades.
- Internal re-organization and cleanup.
- AndroidX Preferences is used to retrieve default
SharedPreferences
, now, since the stockContext
method is deprecated with API 29. - The library is now split into 3 modules: core, RxJava, and coroutines. This library is no longer RxJava-specific. See the README for details.
1.2.1
Enable multiple subscribers on the same Pref instance.
With this:
val myPref: Pref<Int> = // ...
myPref.observe().subscribe { println("One: $it") }
myPref.set("Hi")
myPref.observe().subscribe { println("Two: $it") }
myPref.set("Hello")
You'd get console output like this:
One: Hi
One: Hello
Two: Hello
1.2.0
RxkPrefs
is now an interface, allowing this library to be more mockable in tests. You now must use the rxkPrefs
function to retrieve an instance of this interface, rather than invoking a constructor.
1.1.0
- AndroidX is now stable, so upgraded to that. Also upgraded RxJava.
Pref
itself is now an RxConsumer
, soasConsumer()
is redundant.- Rename
asObservable()
toobserve()
.
1.0.2
- Kotlin 1.2.70.
- Switch from support-annotations to the equivalent androidx package.
1.0.1
- Add
getSharedPrefs()
method in case you need access to the underlyingSharedPreferences
instance. - Internal cleanup and fixes.
1.0.0
The initial release