mirror of
https://github.com/gedoor/legado.git
synced 2024-09-01 09:34:25 +08:00
优化
This commit is contained in:
parent
722efa9998
commit
dc5f09243a
@ -56,7 +56,12 @@ class SearchModel(private val scope: CoroutineScope, private val callBack: CallB
|
|||||||
if (searchGroup.isBlank()) {
|
if (searchGroup.isBlank()) {
|
||||||
bookSourceList.addAll(appDb.bookSourceDao.allEnabled)
|
bookSourceList.addAll(appDb.bookSourceDao.allEnabled)
|
||||||
} else {
|
} else {
|
||||||
bookSourceList.addAll(appDb.bookSourceDao.getEnabledByGroup(searchGroup))
|
val sources = appDb.bookSourceDao.getEnabledByGroup(searchGroup)
|
||||||
|
if (sources.isEmpty()) {
|
||||||
|
bookSourceList.addAll(appDb.bookSourceDao.allEnabled)
|
||||||
|
} else {
|
||||||
|
bookSourceList.addAll(sources)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
searchPage++
|
searchPage++
|
||||||
|
Loading…
Reference in New Issue
Block a user