From 86b69908fa74779b6dc18c0879a12daf13ecd079 Mon Sep 17 00:00:00 2001 From: gedoor Date: Sun, 18 Oct 2020 07:46:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=88=86=E7=BB=84bug?= 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 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 a4ad1d736..cbb1ec990 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 @@ -24,10 +24,10 @@ interface BookDao { @Query("SELECT * FROM books WHERE (`group` & :group) > 0") fun observeByGroup(group: Long): LiveData> - @Query("select * from books where (SELECT sum(groupId) FROM book_groups) & `group` = 0") + @Query("select * from books where (SELECT sum(groupId) FROM book_groups where groupId > 0) & `group` = 0") fun observeNoGroup(): LiveData> - @Query("select count(bookUrl) from books where (SELECT sum(groupId) FROM book_groups) & `group` = 0") + @Query("select count(bookUrl) from books where (SELECT sum(groupId) FROM book_groups where groupId > 0) & `group` = 0") fun observeNoGroupSize(): LiveData @Query("SELECT * FROM books WHERE name like '%'||:key||'%' or author like '%'||:key||'%'")