pull/94/head
kunfei 5 years ago
parent 30d61c61c9
commit 78988d72e8
  1. 2
      app/src/main/java/io/legado/app/ui/replacerule/ReplaceRuleAdapter.kt

@ -92,6 +92,7 @@ class ReplaceRuleAdapter(context: Context, var callBack: CallBack) :
} else { } else {
bundle.keySet().map { bundle.keySet().map {
when (it) { when (it) {
"selected" -> cb_name.isChecked = selectedIds.contains(item.id)
"name", "group" -> "name", "group" ->
if (item.group.isNullOrEmpty()) { if (item.group.isNullOrEmpty()) {
cb_name.text = item.name cb_name.text = item.name
@ -100,7 +101,6 @@ class ReplaceRuleAdapter(context: Context, var callBack: CallBack) :
String.format("%s (%s)", item.name, item.group) String.format("%s (%s)", item.name, item.group)
} }
"enabled" -> swt_enabled.isChecked = item.isEnabled "enabled" -> swt_enabled.isChecked = item.isEnabled
"selected" -> cb_name.isChecked = selectedIds.contains(item.id)
} }
} }
} }

Loading…
Cancel
Save