henrytao
05/20/2018, 1:55 AMval liveData: MutableLiveDataBoolean = MutableLiveData()
liveData
.distinct()
.filter { it == false }
.map { true }
.nonNull()
.observe(lifecycleOwner, { result ->
// result is non-null and always true
})
Check it out: https://medium.com/@henrytao/chaining-livedata-like-rxjava-with-kotlin-extension-e3a2c15ac11ghedeon
05/21/2018, 5:51 PM