See conversation in https://expensify.slack.com/archives/C01GTK53T8Q/p1701890693827559
Steps:
- Add a comment, I can see the lastUpdateID is returned and saved in the key OnyxUpdatesLastUpdateIDAppliedToClient
- Go offline and back online
- AuthScreens reconnect code (
|
NetworkConnection.onReconnect(() => { |
|
if (isLoadingApp) { |
|
App.openApp(); |
|
} else { |
|
App.reconnectApp(lastUpdateIDAppliedToClient); |
|
} |
|
}); |
) runs
- But lastUpdateIDAppliedToClient is NOT the updated updateID we saved above
It is probably because this useEffect call
is passing [] as its dependency.
I was going to add lastUpdateIDAppliedToClient as a dependency but:
- I noticed there's a lot of other variables that we are using that are not passed to useEffect
- Not sure if there is a performance concern if I do that
I see that this behavior was introduced in this PR #27764 by @barttom, so ideally they would fix it.
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~018cbdee1256058e0a
- Upwork Job ID: 1732503147695874048
- Last Price Increase: 2023-12-06
- Automatic offers:
- jjcoffee | Reviewer | 27989002
- situchan | Contributor | 27989059
See conversation in https://expensify.slack.com/archives/C01GTK53T8Q/p1701890693827559
Steps:
App/src/libs/Navigation/AppNavigator/AuthScreens.tsx
Lines 156 to 162 in d6c824b
It is probably because this useEffect call
App/src/libs/Navigation/AppNavigator/AuthScreens.tsx
Line 141 in d6c824b
I was going to add lastUpdateIDAppliedToClient as a dependency but:
I see that this behavior was introduced in this PR #27764 by @barttom, so ideally they would fix it.
Upwork Automation - Do Not Edit