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