livedata-ktx icon indicating copy to clipboard operation
livedata-ktx copied to clipboard

Kotlin extension for LiveData, chaining like RxJava

Results 5 livedata-ktx issues
Sort by recently updated
recently updated
newest added

The `LiveData.debounce(delayMillis: Long)` extension relies on the `Handler` class, which makes view models difficult to test without Robolectric. A possible solution is to wrap `Handler` with an interface and provide...

Code from https://github.com/Shopify/livedata-ktx/blob/master/livedata-ktx/src/main/java/com/shopify/livedataktx/PublishLiveDataKtx.kt: ``` override fun observe(owner: LifecycleOwner, observer: Observer) { val observeSinceVersion = version val wrapper = observerWrappers.getOrElse(observer, Observer { if (!isPublish || version > observeSinceVersion) { observer.onChanged(it) }...

Overload resolution ambiguity all this function match fun LiveData.map(mapper: (T?) -> R?): LiveData = createMediator(this, MapExt(mapper)) fun SupportMediatorLiveData.map(mapper: (T) -> R): SupportMediatorLiveData = createMediator(this, MapExt({ return@MapExt mapper(it!!)!! })) Shows error...

No more need to specify explicitly LiveData's nullability by 'toKtx' or 'toNullableKtx' functions, the compiler will do this job.

There are places where `MutableLiveData` is required, for example in two way data binding. It may be better to make `MutableLiveDataKtx` a subtype of `MutableLiveData` as these dependencies are hard...