Skip to content

Commit

Permalink
call confirmReadyToOpenApp to allow reconnectApp to run
Browse files Browse the repository at this point in the history
  • Loading branch information
arosiclair committed Aug 4, 2023
1 parent a73c535 commit 7028add
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,11 @@ export default function backgroundRefresh() {
return;
}

getLastOnyxUpdateID().then((lastUpdateID) => App.reconnectApp(lastUpdateID));
getLastOnyxUpdateID().then((lastUpdateID) => {
// ReconnectApp waits on our isReadyToOpenApp promise to resolve and this normally only resolves when the LHN is rendered.
// However, on Android this is run in the background using a HeadlessJS task (https://reactnative.dev/docs/headless-js-android)
// which does not render the React UI. So we must manually run confirmReadyToOpenApp here instead
App.confirmReadyToOpenApp();
App.reconnectApp(lastUpdateID);
});
}

0 comments on commit 7028add

Please sign in to comment.