pull/2240/head
kunfei 2 years ago
parent b274032099
commit e69291bcff
  1. 4
      app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceActivity.kt
  2. 18
      app/src/main/java/io/legado/app/ui/replace/ReplaceRuleActivity.kt
  3. 2
      app/src/main/java/io/legado/app/ui/rss/source/manage/RssSourceActivity.kt

@ -335,7 +335,7 @@ class BookSourceActivity : VMBaseActivity<ActivityBookSourceBinding, BookSourceV
override fun onClickSelectBarMainAction() {
alert(titleResource = R.string.draw, messageResource = R.string.sure_del) {
okButton { viewModel.del(*adapter.selection.toTypedArray()) }
yesButton { viewModel.del(*adapter.selection.toTypedArray()) }
noButton()
}
}
@ -588,7 +588,7 @@ class BookSourceActivity : VMBaseActivity<ActivityBookSourceBinding, BookSourceV
}
override fun del(bookSource: BookSource) {
alert(R.string.delete_source) {
alert(R.string.draw) {
setMessage(getString(R.string.sure_del) + "\n" + bookSource.bookSourceName)
noButton()
yesButton {

@ -162,7 +162,10 @@ class ReplaceRuleActivity : VMBaseActivity<ActivityReplaceRuleBinding, ReplaceRu
}
override fun onClickSelectBarMainAction() {
delSourceDialog()
alert(titleResource = R.string.draw, messageResource = R.string.sure_del) {
yesButton { viewModel.delSelection(adapter.selection) }
noButton()
}
}
private fun initSelectActionView() {
@ -172,13 +175,6 @@ class ReplaceRuleActivity : VMBaseActivity<ActivityReplaceRuleBinding, ReplaceRu
binding.selectActionBar.setCallBack(this)
}
private fun delSourceDialog() {
alert(titleResource = R.string.draw, messageResource = R.string.sure_del) {
okButton { viewModel.delSelection(adapter.selection) }
noButton()
}
}
private fun observeReplaceRuleData(searchKey: String? = null) {
dataInit = false
replaceRuleFlowJob?.cancel()
@ -329,9 +325,15 @@ class ReplaceRuleActivity : VMBaseActivity<ActivityReplaceRuleBinding, ReplaceRu
}
override fun delete(rule: ReplaceRule) {
alert(R.string.draw) {
setMessage(getString(R.string.sure_del) + "\n" + rule.name)
noButton()
yesButton {
setResult(RESULT_OK)
viewModel.delete(rule)
}
}
}
override fun edit(rule: ReplaceRule) {
setResult(RESULT_OK)

@ -329,7 +329,7 @@ class RssSourceActivity : VMBaseActivity<ActivityRssSourceBinding, RssSourceView
}
override fun del(source: RssSource) {
alert(R.string.delete_source) {
alert(R.string.draw) {
setMessage(getString(R.string.sure_del) + "\n" + source.sourceName)
noButton()
yesButton {

Loading…
Cancel
Save