pull/1630/head
kunfei 3 years ago
parent ae76380e44
commit 1138d7e64a
  1. 14
      app/src/main/java/io/legado/app/ui/book/source/edit/BookSourceEditActivity.kt

@ -192,7 +192,13 @@ class BookSourceEditActivity :
source?.let { source?.let {
binding.cbIsEnable.isChecked = it.enabled binding.cbIsEnable.isChecked = it.enabled
binding.cbIsEnableFind.isChecked = it.enabledExplore binding.cbIsEnableFind.isChecked = it.enabledExplore
binding.spType.setSelection(it.bookSourceType) binding.spType.setSelection(
when (it.bookSourceType) {
3 -> 2
1 -> 1
else -> 0
}
)
} }
//基本信息 //基本信息
sourceEntities.clear() sourceEntities.clear()
@ -291,7 +297,11 @@ class BookSourceEditActivity :
val source = viewModel.bookSource?.copy() ?: BookSource() val source = viewModel.bookSource?.copy() ?: BookSource()
source.enabled = binding.cbIsEnable.isChecked source.enabled = binding.cbIsEnable.isChecked
source.enabledExplore = binding.cbIsEnableFind.isChecked source.enabledExplore = binding.cbIsEnableFind.isChecked
source.bookSourceType = binding.spType.selectedItemPosition source.bookSourceType = when (binding.spType.selectedItemPosition) {
2 -> 3
1 -> 1
else -> 0
}
val searchRule = SearchRule() val searchRule = SearchRule()
val exploreRule = ExploreRule() val exploreRule = ExploreRule()
val bookInfoRule = BookInfoRule() val bookInfoRule = BookInfoRule()

Loading…
Cancel
Save