koufa
12/09/2017, 9:37 PMproductDataStore.loadProducts
is returning a channel that it gets from Room Database
where I open an Rx Flowable and convert it to a coroutines channel
. So I want a channel
to continuously listen to Room Db
updates. I don’t need a lateinit var channel
I just forgot to make it a local var. viewState
property is a MutableLiveData
instance. I don’t want to expose this to the consumers because then they could mutate it. I am just returning it as a LiveData
reference therefore I need the viewState()
function too. As for the actor
I am using it a a single entry point for predefined sealed class
actions that the consumers of the ViewModel
can act upon.