Update: Replace repositories observable disposable with Room-RxJava's Flowable

This commit is contained in:
machiav3lli
2022-01-03 00:38:55 +01:00
parent 70eee26048
commit 4547ef8a55
4 changed files with 13 additions and 25 deletions

View File

@ -7,6 +7,7 @@ import androidx.sqlite.db.SimpleSQLiteQuery
import androidx.sqlite.db.SupportSQLiteQuery
import com.looker.droidify.*
import com.looker.droidify.entity.ProductItem
import io.reactivex.rxjava3.core.Flowable
interface BaseDao<T> {
@ -53,6 +54,9 @@ interface RepositoryDao : BaseDao<Repository> {
@get:Query("SELECT * FROM repository WHERE deleted == 0 ORDER BY _id ASC")
val all: List<Repository>
@get:Query("SELECT * FROM repository WHERE deleted == 0 ORDER BY _id ASC")
val allFlowable: Flowable<List<Repository>>
@get:Query("SELECT _id, deleted FROM repository WHERE deleted != 0 and enabled == 0 ORDER BY _id ASC")
val allDisabledDeleted: List<Repository.IdAndDeleted>