This commit is contained in:
kunfei committed 2022-10-20 20:24:41 +08:00
1 parent bd2f798b63
commit 0bd4f08ecc
1 file changed
+3 -1
@@ -98,7 +98,9 @@ data class SearchScope(private var scope: String) {
*/
fun getBookSources(): List<BookSource> {
val list = hashSetOf<BookSource>()
if (scope.contains("::")) {
if (scope.isEmpty()) {
list.addAll(appDb.bookSourceDao.allEnabled)
} else if (scope.contains("::")) {
scope.substringAfter("::").let {
appDb.bookSourceDao.getBookSource(it)?.let { source ->
list.add(source)