From 678e6125dd3e16fcb0e97dc37909dbe838e231d0 Mon Sep 17 00:00:00 2001 From: kunfei Date: Thu, 20 Oct 2022 20:26:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/io/legado/app/ui/book/search/SearchScope.kt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/book/search/SearchScope.kt b/app/src/main/java/io/legado/app/ui/book/search/SearchScope.kt index 27e84877b..5102601fa 100644 --- a/app/src/main/java/io/legado/app/ui/book/search/SearchScope.kt +++ b/app/src/main/java/io/legado/app/ui/book/search/SearchScope.kt @@ -120,8 +120,12 @@ data class SearchScope(private var scope: String) { } if (list.isEmpty()) { scope = "" - stateLiveData.postValue(scope) - return appDb.bookSourceDao.allEnabled + appDb.bookSourceDao.allEnabled.let { + if (it.isNotEmpty()) { + stateLiveData.postValue(scope) + list.addAll(it) + } + } } return list.sortedBy { it.customOrder } }