pull/2240/head
kunfei 2 years ago
parent e69291bcff
commit 808ce9869a
  1. 8
      app/src/main/java/io/legado/app/ui/book/local/rule/TxtTocRuleActivity.kt

@ -88,8 +88,14 @@ class TxtTocRuleActivity : VMBaseActivity<ActivityTxtTocRuleBinding, TxtTocRuleV
} }
override fun del(source: TxtTocRule) { override fun del(source: TxtTocRule) {
alert(R.string.draw) {
setMessage(getString(R.string.sure_del) + "\n" + source.name)
noButton()
yesButton {
viewModel.del(source) viewModel.del(source)
} }
}
}
override fun edit(source: TxtTocRule) { override fun edit(source: TxtTocRule) {
alert(titleResource = R.string.txt_toc_regex) { alert(titleResource = R.string.txt_toc_regex) {
@ -151,7 +157,7 @@ class TxtTocRuleActivity : VMBaseActivity<ActivityTxtTocRuleBinding, TxtTocRuleV
private fun delSourceDialog() { private fun delSourceDialog() {
alert(titleResource = R.string.draw, messageResource = R.string.sure_del) { alert(titleResource = R.string.draw, messageResource = R.string.sure_del) {
okButton { viewModel.del(*adapter.selection.toTypedArray()) } yesButton { viewModel.del(*adapter.selection.toTypedArray()) }
noButton() noButton()
} }
} }

Loading…
Cancel
Save