0
0
mirror of https://github.com/ankidroid/Anki-Android.git synced 2024-09-20 03:52:15 +02:00

Create copy of list when filtering

This commit is contained in:
shaiguelman 2022-07-17 19:56:52 -05:00
parent dafbbf7c19
commit 40854dcd6e

View File

@ -361,7 +361,7 @@ class DeckAdapter(private val layoutInflater: LayoutInflater, context: Context)
if (containsFilterString(filterPattern, root.value)) {
return root
}
val children = root.children
val children = root.children.toMutableList()
val ret: MutableList<TreeNode<AbstractDeckTreeNode>> = ArrayList(children.size)
for (child in children) {
val returned = filterDeckInternal(filterPattern, child)