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