pull/2468/head 3.22.102020
kunfei 2 years ago
parent 678e6125dd
commit 710adb58ee
  1. 4
      app/src/main/java/io/legado/app/ui/book/search/SearchScope.kt

@ -100,7 +100,8 @@ data class SearchScope(private var scope: String) {
val list = hashSetOf<BookSource>() val list = hashSetOf<BookSource>()
if (scope.isEmpty()) { if (scope.isEmpty()) {
list.addAll(appDb.bookSourceDao.allEnabled) list.addAll(appDb.bookSourceDao.allEnabled)
} else if (scope.contains("::")) { } 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)
@ -127,6 +128,7 @@ data class SearchScope(private var scope: String) {
} }
} }
} }
}
return list.sortedBy { it.customOrder } return list.sortedBy { it.customOrder }
} }

Loading…
Cancel
Save