Skip to content

Commit

Permalink
Merge pull request #47478 from nkdengineer/fix/46393
Browse files Browse the repository at this point in the history
fix: Message and Notification Swapping in IOU
  • Loading branch information
tgolen authored Sep 2, 2024
2 parents c7934c5 + 1db02c0 commit e60b821
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/libs/Network/SequentialQueue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,10 @@ function flush() {
resolveIsReadyPromise?.();
}
currentRequest = null;
flushOnyxUpdatesQueue();
// The queue can be paused when we sync the data with backend so we should only update the Onyx data when the queue is empty
if (PersistedRequests.getAll().length === 0) {
flushOnyxUpdatesQueue();
}
});
},
});
Expand All @@ -179,7 +182,6 @@ function unpause() {
const numberOfPersistedRequests = PersistedRequests.getAll().length || 0;
console.debug(`[SequentialQueue] Unpausing the queue and flushing ${numberOfPersistedRequests} requests`);
isQueuePaused = false;
flushOnyxUpdatesQueue();
flush();
}

Expand Down

0 comments on commit e60b821

Please sign in to comment.