This commit is contained in:
Christien Rioux 2025-05-12 10:15:53 -04:00
parent 8194a79ce4
commit ae154f1bed
10 changed files with 340 additions and 289 deletions

View file

@ -83,16 +83,13 @@ class AuthorInputQueue {
}
}
/// Remove a reconciled message and move to the next message
/// Move the reconciliation cursor (_inputPosition) forward on the input
/// queue and tees up the next message for processing
/// Returns true if there is more work to do
/// Returns false if there are no more messages to reconcile in this queue
Future<bool> advance() async {
final currentMessage = await getCurrentMessage();
if (currentMessage == null) {
return false;
}
// Move current message to previous
_previousMessage = _currentMessage;
_previousMessage = await getCurrentMessage();
_currentMessage = null;
while (true) {
@ -178,7 +175,7 @@ class AuthorInputQueue {
// _inputPosition points to either before the input source starts
// or the position of the previous element. We still need to set the
// _currentMessage to the previous element so consume() can compare
// _currentMessage to the previous element so advance() can compare
// against it if we can.
if (_inputPosition >= 0) {
_currentMessage = currentWindow