diff --git a/app/src/main/java/io/legado/app/ui/rss/source/edit/RssSourceEditActivity.kt b/app/src/main/java/io/legado/app/ui/rss/source/edit/RssSourceEditActivity.kt index 5b30243b5..9233ef8fa 100644 --- a/app/src/main/java/io/legado/app/ui/rss/source/edit/RssSourceEditActivity.kt +++ b/app/src/main/java/io/legado/app/ui/rss/source/edit/RssSourceEditActivity.kt @@ -24,7 +24,7 @@ import io.legado.app.ui.rss.source.debug.RssSourceDebugActivity import io.legado.app.ui.widget.KeyboardToolPop import io.legado.app.utils.GSON import io.legado.app.utils.getViewModel -import kotlinx.android.synthetic.main.activity_book_source_edit.* +import kotlinx.android.synthetic.main.activity_rss_source_edit.* import org.jetbrains.anko.displayMetrics import org.jetbrains.anko.startActivity import org.jetbrains.anko.toast @@ -99,6 +99,10 @@ class RssSourceEditActivity : } private fun upRecyclerView(rssSource: RssSource?) { + rssSource?.let { + cb_is_enable.isChecked = rssSource.enabled + cb_enable_js.isChecked = rssSource.enableJs + } sourceEntities.clear() sourceEntities.apply { add(EditEntity("sourceName", rssSource?.sourceName, R.string.rss_source_name)) @@ -132,6 +136,8 @@ class RssSourceEditActivity : private fun getRssSource(): RssSource? { val source = viewModel.sourceLiveData.value ?: RssSource() + source.enabled = cb_is_enable.isChecked + source.enableJs = cb_enable_js.isChecked sourceEntities.forEach { when (it.key) { "sourceName" -> source.sourceName = it.value ?: "" diff --git a/app/src/main/res/layout/activity_rss_source_edit.xml b/app/src/main/res/layout/activity_rss_source_edit.xml index dd2545faf..c60fce039 100644 --- a/app/src/main/res/layout/activity_rss_source_edit.xml +++ b/app/src/main/res/layout/activity_rss_source_edit.xml @@ -15,6 +15,27 @@ app:fitStatusBar="false" app:title="@string/rss_source_edit" /> + + + + + + + + 音乐 音频 启用 + 启用JS 全部书源 输入不能为空 清空发现缓存