edit ImportBookSourceViewModel.kt

pull/849/head 3.21.021012
gedoor 4 years ago
parent f8ecc0c88a
commit 74f0c61067
  1. 6
      app/src/main/java/io/legado/app/ui/association/ImportBookSourceViewModel.kt

@ -152,9 +152,9 @@ class ImportBookSourceViewModel(app: Application) : BaseViewModel(app) {
private fun comparisonSource() {
execute {
allSources.forEach {
val has = appDb.bookSourceDao.getBookSource(it.bookSourceUrl)
checkSources.add(has)
selectStatus.add(has == null)
val source = appDb.bookSourceDao.getBookSource(it.bookSourceUrl)
checkSources.add(source)
selectStatus.add(source == null || source.lastUpdateTime < it.lastUpdateTime)
}
successLiveData.postValue(allSources.size)
}

Loading…
Cancel
Save