This commit is contained in:
kunfei
2022-10-20 20:24:41 +08:00
parent 3b0e418bba
commit 6e7d6a5a85
@@ -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)