Skip to content

Commit

Permalink
clearer comment
Browse files Browse the repository at this point in the history
  • Loading branch information
arosiclair committed Aug 4, 2023
1 parent 7028add commit 02c6981
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,13 @@ export default function backgroundRefresh() {
}

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
/**
* ReconnectApp waits on the isReadyToOpenApp promise to resolve and this normally only resolves when the LHN is rendered.
* However on Android, this callback is run in the background using a Headless JS task which does not render the React UI,
* so we must manually run confirmReadyToOpenApp here instead.
*
* See more here: https://reactnative.dev/docs/headless-js-android
*/
App.confirmReadyToOpenApp();
App.reconnectApp(lastUpdateID);
});
Expand Down

0 comments on commit 02c6981

Please sign in to comment.