pull/1814/head
kunfei 3 years ago
parent 73dd586edc
commit 696c33dcab
  1. 10
      app/src/main/java/io/legado/app/ui/book/local/rule/TxtTocRuleAdapter.kt

@ -24,14 +24,8 @@ class TxtTocRuleAdapter(context: Context, private val callBack: CallBack) :
private val selected = linkedSetOf<TxtTocRule>() private val selected = linkedSetOf<TxtTocRule>()
val selection: List<TxtTocRule> val selection: List<TxtTocRule>
get() { get() = getItems().filter {
val selection = arrayListOf<TxtTocRule>() selected.contains(it)
getItems().map {
if (selected.contains(it)) {
selection.add(it)
}
}
return selection.sortedBy { it.serialNumber }
} }
override fun getViewBinding(parent: ViewGroup): ItemTxtTocRuleBinding { override fun getViewBinding(parent: ViewGroup): ItemTxtTocRuleBinding {

Loading…
Cancel
Save