优化搜索

pull/737/head^2
gedoor 4 years ago
parent a61dc18b02
commit 389c3bbb7a
  1. 10
      app/src/main/java/io/legado/app/ui/replace/ReplaceRuleAdapter.kt

@ -101,10 +101,12 @@ class ReplaceRuleAdapter(context: Context, var callBack: CallBack) :
override fun registerListener(holder: ItemViewHolder, binding: ItemReplaceRuleBinding) {
binding.apply {
swtEnabled.setOnCheckedChangeListener { _, isChecked ->
getItem(holder.layoutPosition)?.let {
it.isEnabled = isChecked
callBack.update(it)
swtEnabled.setOnCheckedChangeListener { buttonView, isChecked ->
if (buttonView.isPressed) {
getItem(holder.layoutPosition)?.let {
it.isEnabled = isChecked
callBack.update(it)
}
}
}
ivEdit.onClick {

Loading…
Cancel
Save