From 74f0c61067146848d73a3d179aef22a0ca3d1ef2 Mon Sep 17 00:00:00 2001 From: gedoor Date: Wed, 10 Feb 2021 12:06:58 +0800 Subject: [PATCH] edit ImportBookSourceViewModel.kt --- .../legado/app/ui/association/ImportBookSourceViewModel.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/association/ImportBookSourceViewModel.kt b/app/src/main/java/io/legado/app/ui/association/ImportBookSourceViewModel.kt index 35072f651..42647cf6e 100644 --- a/app/src/main/java/io/legado/app/ui/association/ImportBookSourceViewModel.kt +++ b/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) }