优化
This commit is contained in:
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> {
|
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)
|
||||||
|
|||||||
Reference in new issue
Block a user