pull/1753/head^2
kunfei 3 years ago
parent ee689763a5
commit 542a3639fd
  1. 18
      app/src/main/java/io/legado/app/ui/book/changesource/ChangeBookSourceViewModel.kt

@ -223,24 +223,22 @@ open class ChangeBookSourceViewModel(application: Application) : BaseViewModel(a
private fun getDbSearchBooks(): List<SearchBook> {
return if (screenKey.isEmpty()) {
if (AppConfig.changeSourceCheckAuthor) {
appDb.searchBookDao.getChangeSourceSearch(name, author, AppConfig.searchGroup)
appDb.searchBookDao.getChangeSourceSearch(
name, author, AppConfig.searchGroup
)
} else {
appDb.searchBookDao.getChangeSourceSearch(name, "", AppConfig.searchGroup)
appDb.searchBookDao.getChangeSourceSearch(
name, "", AppConfig.searchGroup
)
}
} else {
if (AppConfig.changeSourceCheckAuthor) {
appDb.searchBookDao.getChangeSourceSearch(
name,
author,
screenKey,
AppConfig.searchGroup
name, author, screenKey, AppConfig.searchGroup
)
} else {
appDb.searchBookDao.getChangeSourceSearch(
name,
"",
screenKey,
AppConfig.searchGroup
name, "", screenKey, AppConfig.searchGroup
)
}
}

Loading…
Cancel
Save