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

@ -16,6 +16,7 @@ import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel
import io.legado.app.R import io.legado.app.R
import io.legado.app.base.VMBaseActivity import io.legado.app.base.VMBaseActivity
import io.legado.app.constant.AppConst import io.legado.app.constant.AppConst
import io.legado.app.constant.BookType
import io.legado.app.data.entities.BookSource import io.legado.app.data.entities.BookSource
import io.legado.app.data.entities.rule.* import io.legado.app.data.entities.rule.*
import io.legado.app.databinding.ActivityBookSourceEditBinding import io.legado.app.databinding.ActivityBookSourceEditBinding
@ -194,8 +195,8 @@ class BookSourceEditActivity :
binding.cbIsEnableFind.isChecked = it.enabledExplore binding.cbIsEnableFind.isChecked = it.enabledExplore
binding.spType.setSelection( binding.spType.setSelection(
when (it.bookSourceType) { when (it.bookSourceType) {
3 -> 2 BookType.image -> 2
1 -> 1 BookType.audio -> 1
else -> 0 else -> 0
} }
) )
@ -298,9 +299,9 @@ class BookSourceEditActivity :
source.enabled = binding.cbIsEnable.isChecked source.enabled = binding.cbIsEnable.isChecked
source.enabledExplore = binding.cbIsEnableFind.isChecked source.enabledExplore = binding.cbIsEnableFind.isChecked
source.bookSourceType = when (binding.spType.selectedItemPosition) { source.bookSourceType = when (binding.spType.selectedItemPosition) {
2 -> 3 2 -> BookType.image
1 -> 1 1 -> BookType.audio
else -> 0 else -> BookType.default
} }
val searchRule = SearchRule() val searchRule = SearchRule()
val exploreRule = ExploreRule() val exploreRule = ExploreRule()

Loading…
Cancel
Save