优化书源导入

pull/540/head
gedoor 4 years ago
parent 3d65cd8a8f
commit e04efe2293
  1. 12
      app/src/main/java/io/legado/app/ui/association/ImportBookSourceDialog.kt

@ -141,12 +141,12 @@ class ImportBookSourceDialog : BaseDialogFragment(), Toolbar.OnMenuItemClickList
binding.apply {
cbSourceName.isChecked = viewModel.selectStatus[holder.layoutPosition]
cbSourceName.text = item.bookSourceName
tvSourceState.text =
if (viewModel.checkSources[holder.layoutPosition] != null) {
"已存在"
} else {
"新书源"
}
val localSource = viewModel.checkSources[holder.layoutPosition]
tvSourceState.text = when {
localSource == null -> "新书源"
item.lastUpdateTime > localSource.lastUpdateTime -> "更新"
else -> "已存在"
}
}
}

Loading…
Cancel
Save