Remove second invalidate on meta node remove
This commit is contained in:
parent
25281d0f6d
commit
6ba189fa34
@ -324,8 +324,6 @@ private class MutableMetaImpl(
|
|||||||
//remove child and invalidate if argument is null
|
//remove child and invalidate if argument is null
|
||||||
if (node == null) {
|
if (node == null) {
|
||||||
children.remove(token)?.removeListener(this)
|
children.remove(token)?.removeListener(this)
|
||||||
// old item is not null otherwise we can't be here
|
|
||||||
invalidate(name)
|
|
||||||
} else {
|
} else {
|
||||||
val newNode = wrapItem(node)
|
val newNode = wrapItem(node)
|
||||||
newNode.adoptBy(this, token)
|
newNode.adoptBy(this, token)
|
||||||
@ -335,7 +333,7 @@ private class MutableMetaImpl(
|
|||||||
|
|
||||||
else -> {
|
else -> {
|
||||||
val token = name.firstOrNull()!!
|
val token = name.firstOrNull()!!
|
||||||
//get existing or create new node.
|
//get an existing node or create a new node.
|
||||||
if (items[token] == null) {
|
if (items[token] == null) {
|
||||||
val newNode = MutableMetaImpl(null)
|
val newNode = MutableMetaImpl(null)
|
||||||
newNode.adoptBy(this, token)
|
newNode.adoptBy(this, token)
|
||||||
|
Loading…
Reference in New Issue
Block a user