applyChanges method
Applies a list of changes.
Every change is tried, so one the document refuses does not hold back the ones behind it. One status request covers the whole batch.
A causal gap is the one failure a resync can close, so it is the only one answered with requestDocumentStatus: re-serving the same document would fail the same way for any other reason, and asking again is a loop rather than a recovery.
Anything else becomes a SyncFault. {@macro sync_fault_not_thrown}
Implementation
void applyChanges(List<Change> changes) {
var gap = false;
for (final change in changes) {
gap |= _applyOne(change);
}
if (gap) {
requestDocumentStatus();
}
}