pull/2468/head
kunfei 2 years ago
parent 3b0e418bba
commit 6e7d6a5a85
  1. 4
      app/src/main/java/io/legado/app/ui/book/search/SearchScope.kt

@ -98,7 +98,9 @@ data class SearchScope(private var scope: String) {
*/ */
fun getBookSources(): List<BookSource> { fun getBookSources(): List<BookSource> {
val list = hashSetOf<BookSource>() val list = hashSetOf<BookSource>()
if (scope.contains("::")) { if (scope.isEmpty()) {
list.addAll(appDb.bookSourceDao.allEnabled)
} else if (scope.contains("::")) {
scope.substringAfter("::").let { scope.substringAfter("::").let {
appDb.bookSourceDao.getBookSource(it)?.let { source -> appDb.bookSourceDao.getBookSource(it)?.let { source ->
list.add(source) list.add(source)

Loading…
Cancel
Save