kunfei hace 4 años
padre
commit
30adf4ea1d
Se han modificado 1 ficheros con 6 adiciones y 2 borrados
  1. 6 2
      app/src/main/java/io/legado/app/ui/book/search/SearchScope.kt

+ 6 - 2
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 }
     }