feat: 优化代码

pull/115/head
kunfei 5 years ago
parent b5457fe80c
commit fdb68976a4
  1. 3
      app/src/main/java/io/legado/app/ui/book/read/config/TocRegexDialog.kt

@ -31,7 +31,6 @@ import io.legado.app.model.localBook.AnalyzeTxtFile
import io.legado.app.ui.widget.recycler.VerticalDivider import io.legado.app.ui.widget.recycler.VerticalDivider
import io.legado.app.utils.applyTint import io.legado.app.utils.applyTint
import kotlinx.android.synthetic.main.dialog_toc_regex.* import kotlinx.android.synthetic.main.dialog_toc_regex.*
import kotlinx.android.synthetic.main.dialog_toc_regex_edit.*
import kotlinx.android.synthetic.main.dialog_toc_regex_edit.view.* import kotlinx.android.synthetic.main.dialog_toc_regex_edit.view.*
import kotlinx.android.synthetic.main.item_toc_regex.view.* import kotlinx.android.synthetic.main.item_toc_regex.view.*
import kotlinx.coroutines.Dispatchers.IO import kotlinx.coroutines.Dispatchers.IO
@ -150,7 +149,7 @@ class TocRegexDialog : BaseDialogFragment(), Toolbar.OnMenuItemClickListener {
} }
} }
okButton { okButton {
rootView?.let { rootView?.apply {
tocRule.name = tv_rule_name.text.toString() tocRule.name = tv_rule_name.text.toString()
tocRule.rule = tv_rule_regex.text.toString() tocRule.rule = tv_rule_regex.text.toString()
saveRule(tocRule, rule) saveRule(tocRule, rule)

Loading…
Cancel
Save