NetworkedMap.markIndexDirty
This commit is contained in:
parent
b4902559ac
commit
2f782d7825
@ -77,6 +77,13 @@ class NetworkedMap<K, V>(
|
||||
})
|
||||
}
|
||||
|
||||
// forces re-network of specified index
|
||||
fun markIndexDirty(index: K) {
|
||||
if (index in this) {
|
||||
backlog.add(currentVersion() to Entry(Action.ADD, KOptional(nativeKey.copy(index)), KOptional(nativeValue.copy(this[index] as V)))) // not null!! assert because V might be nullable
|
||||
}
|
||||
}
|
||||
|
||||
private val listeners = CopyOnWriteArrayList<Listener>()
|
||||
|
||||
private inner class Listener(val listener: ListenableMap.MapListener<K, V>) : Listenable.L {
|
||||
|
Loading…
Reference in New Issue
Block a user