From 2bd0c7024def0134ba5f9c1b4d5a69efbd8e4c52 Mon Sep 17 00:00:00 2001 From: kunfei Date: Thu, 13 Feb 2020 21:41:12 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/io/legado/app/data/dao/BookDao.kt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/src/main/java/io/legado/app/data/dao/BookDao.kt b/app/src/main/java/io/legado/app/data/dao/BookDao.kt index 399f79c45..7334f26ad 100644 --- a/app/src/main/java/io/legado/app/data/dao/BookDao.kt +++ b/app/src/main/java/io/legado/app/data/dao/BookDao.kt @@ -23,12 +23,9 @@ interface BookDao { @Query("SELECT * FROM books WHERE origin <> '${BookType.local}' and type = 0 order by durChapterTime desc") fun observeDownload(): LiveData> - @Query("SELECT * FROM books WHERE `group` = :group") + @Query("SELECT * FROM books WHERE (`group` & :group) > 0") fun observeByGroup(group: Int): LiveData> - @Query("SELECT bookUrl FROM books WHERE `group` = :group") - fun observeUrlsByGroup(group: Int): LiveData> - @Query("SELECT * FROM books WHERE name like '%'||:key||'%' or author like '%'||:key||'%'") fun liveDataSearch(key: String): LiveData>