|
|
|
@ -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) |
|
|
|
|