Skip to content

Commit

Permalink
Merge pull request #45709 from Expensify/ionatan_logoutdatedclient
Browse files Browse the repository at this point in the history
Log when onyx updates is outdated

(cherry picked from commit 806fd8f)
  • Loading branch information
iwiznia authored and OSBotify committed Jul 19, 2024
1 parent 8743012 commit 38c8764
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/libs/actions/OnyxUpdates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,15 @@ function doesClientNeedToBeUpdated(previousUpdateID = 0, clientLastUpdateID = 0)

// If we don't have any value in lastUpdateIDFromClient, this is the first time we're receiving anything, so we need to do a last reconnectApp
if (!lastUpdateIDFromClient) {
Log.info('We do not have lastUpdateIDFromClient, client needs updating');
return true;
}
if (lastUpdateIDFromClient < previousUpdateID) {
Log.info('lastUpdateIDFromClient is less than the previousUpdateID received, client needs updating', false, {lastUpdateIDFromClient, previousUpdateID});
return true;
}

return lastUpdateIDFromClient < previousUpdateID;
return false;
}

// eslint-disable-next-line import/prefer-default-export
Expand Down

0 comments on commit 38c8764

Please sign in to comment.