commitRestores method

void commitRestores(
  1. Object inverse,
  2. List<K> now
)

Links what inverse restores to now, the identities it really got.

Pairs them by position, and does nothing for an inverse that noteRestores never named. Call it the moment the inverse is written: an identity minted with the operation is known as soon as it is built, one that is the operation's stamp only once the document mints it.

Implementation

void commitRestores(Object inverse, List<K> now) {
  final was = _pendingRestores[inverse];
  if (was == null) {
    return;
  }
  for (var i = 0; i < was.length && i < now.length; i += 1) {
    noteRebuilt(was[i], now[i]);
  }
}