优化
This commit is contained in:
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user