pull/1419/head
gedoor 3 years ago
parent 722efa9998
commit dc5f09243a
  1. 7
      app/src/main/java/io/legado/app/model/webBook/SearchModel.kt

@ -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…
Cancel
Save