I have an function in @Dao
. Lets call that class DaoClass
abstract fun getData() : Flowable<List<Data>>
Now, I want to check if list of data returned is empty or not. I dug through the DaoClass_Impl (generated at build time) and I found out that the Flowable won't be empty. So,
getData().isEmpty
will always return false.
So what I did was
getData().singleOrError().map{it.isEmpty()}
to return if the returned list is actually empty.
But I am having problem as the value is not getting emitted.