Skip to content

Releases: afollestad/rxkprefs

2.0.1

01 Dec 04:45
Compare
Choose a tag to compare
  • Dependency upgrades.
  • Internal re-organization and cleanup.
  • AndroidX Preferences is used to retrieve default SharedPreferences, now, since the stock Context 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

29 Dec 22:38
Compare
Choose a tag to compare

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

11 Nov 19:38
Compare
Choose a tag to compare

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

22 Sep 02:32
Compare
Choose a tag to compare
  1. AndroidX is now stable, so upgraded to that. Also upgraded RxJava.
  2. Pref itself is now an Rx Consumer, so asConsumer() is redundant.
  3. Rename asObservable() to observe().

1.0.2

16 Sep 19:41
Compare
Choose a tag to compare
  1. Kotlin 1.2.70.
  2. Switch from support-annotations to the equivalent androidx package.

1.0.1

03 Sep 04:42
Compare
Choose a tag to compare
  1. Add getSharedPrefs() method in case you need access to the underlying SharedPreferences instance.
  2. Internal cleanup and fixes.

1.0.0

02 Sep 22:06
Compare
Choose a tag to compare

The initial release